php文件上载

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:43:43978browse

php文件下载
php文件下载代码:
header ( "Content-type:application/exe" );
header ( "Content-Disposition: inline; filename=vdbupt2.exe" );
readfile ( "./WebApp/vdbupt2.exe");
readfile ("./WebApp/1.sql");

读取1.sql和vdbupt2.exe两个文件值,将值合并,用户下载新的vdbupt2.exe数据。
问题:1.sql 文件时中文数据,下载后的文件存在乱码 ,例:"insert into T_TANKA_33(Code,Name,Standard,Notes,ViewCode,Unit,ParentCode,PriceCode,PriceType,V47,F33000) values('Z-01-01','涓垎椤炩憼','','','','','-1','','','','鍖楁捣閬?);" 。 请大家帮忙看下

------解决方案--------------------
你工作在 window 系统中,语言编码是 gbk 的
而你的sql文件采用了 utf-8 编码的,所以打开后开到的是“乱码”

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