PHP头条
热点:

php文件上载


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 编码的,所以打开后开到的是“乱码”

www.phpzy.comtrue/phprm/37421.htmlTechArticlephp文件上载 php文件下载 php文件下载代码: header ( "Content-type:application/exe" ); header ( "Content-Disposition: inline; filename=vdbupt2.exe" ); readfile ( "./WebApp/vdbupt2.exe"); readfile ("./WebApp/1.sql"); 读取1.sql和...

相关文章

PHP之友评论

今天推荐