Home  >  Article  >  Backend Development  >  php文件输出

php文件输出

WBOY
WBOYOriginal
2016-06-23 13:24:17908browse

Header("Content-type: application/octet-stream");Header("Content-Disposition: attachment; filename=log.txt");$filename = '/proj/logs/log.txt';$handle = fopen($filename, "r");$contents = fread($handle, filesize($filename));fclose($handle);echo $contents;die;


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn