src/SMB/Arrayto/Plugins/Csv/Downloader.php
public function downloadExistsFile($fileName, $aliasOfFileName = '')
    {
        $baseFileName = $aliasOfFileName === '' ? basename($fileName) : $aliasOfFileName;

        header("Content-Type: text/csv; charset={$this->getHeaderCharset()}");
        header("Content-Disposition: attachment; filename={$baseFileName}");

        readfile($fileName);
    }
public function downloadExistsFile($fileName, $aliasOfFileName = '')
    {
        $baseFileName = $aliasOfFileName === '' ? basename($fileName) : $aliasOfFileName;

        header("Content-Type: text/csv; charset={$this->getHeaderCharset()}");
        header("Content-Disposition: attachment; filename={$baseFileName}");

        readfile($fileName);
    }
public function downloadExistsFile ( $ fileName , $ aliasOfFileName = '' ) { $ baseFileName = $ aliasOfFileName === '' ? basename ( $ fileName ) : $ aliasOfFileName ; header ( "Content-Type: text/csv; charset={$this->getHeaderCharset()}" ) ; header ( "Content-Disposition: attachment; filename={$baseFileName}" ) ; readfile ( $ fileName ) ; }
download an existing file
@param string $fileName e.g.) sample.xxx | ../sample.xxx | /path/to/sample.xxx
@param string $aliasOfFileName
download an existing file