Home >Backend Development >PHP Tutorial >通过PHP下载的应用程序文件无法运行怎么处理

通过PHP下载的应用程序文件无法运行怎么处理

WBOY
WBOYOriginal
2016-06-13 12:25:29922browse

通过PHP下载的应用程序文件无法运行怎么办?
网站里放了个exe文件,然后通过如下代码下载下来之后发现无法运行,而且就连图标都丢了,是什么原因呢?

<br />		$fs = fopen($_finame,'r');<br />		$_fisize = filesize($_finame);<br />		Header("Content-type: application/octet-stream");<br />		Header("Accept-Ranges: bytes");<br />		Header("Accept-Length: ".$_fisize);<br />		Header("Content-Disposition: attachment; filename=".basename($_finame));<br />		$buffer = 512;<br />		while(!feof($fs)){<br />			$_fidata = fread($fs,$buffer);<br />			echo $_fidata;<br />		}<br />		fclose($fs);<br />


在线等。。。
------解决思路----------------------
自己解决了这是。。
------解决思路----------------------

引用:
原来要放在压缩包里才行啊。。。
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