can't open file which download with php code
Posted
by user304828
on Stack Overflow
See other posts from Stack Overflow
or by user304828
Published on 2010-06-07T02:56:38Z
Indexed on
2010/06/07
3:02 UTC
Read the original article
Hit count: 250
php
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
i downloaded file but can't open file ? why ?
© Stack Overflow or respective owner