Understanding downloaded file location in php -


i have code in download.php file:

$file = //path file (for example .xlsx file) if (file_exists($file)) {         header('content-description: file transfer');         header('content-type: application/vnd.ms-excel');         header('content-disposition: attachment; filename=file.xlsx');         header('content-transfer-encoding: binary');         header('expires: 0');         header('cache-control: must-revalidate');         header('pragma: public');         header('content-length: ' . filesize($file));         readfile($file);         exit;     } 

so, if open site.com/download.php, excel file downloaded.

my question is:

somehow, downloader can understand downloaded xlsx file location on server? or impossible?

no. client have no idea on server excel file came from.

you generating in realtime or scraping site or loading file. no way tell.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -