php创建了中文目录后,出现错误!求解决!
php创建了中文目录后,出现错误Warning:Unknown:failedtoopenstream:NosuchfileordirectoryinUnknownonli...
php创建了中文目录后,出现错误
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'D:/phpStudy/WWW/15杞欢1鐝粍鏉惧北02/login.php' (include_path='.;C:\php\pear') in Unknown on line 0
因为是作业,必须要中文 展开
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'D:/phpStudy/WWW/15杞欢1鐝粍鏉惧北02/login.php' (include_path='.;C:\php\pear') in Unknown on line 0
因为是作业,必须要中文 展开
2个回答
2017-06-14
展开全部
windows的编码是gbk的,如果php文件是utf-8编码的,就会有问题,
要用$path = iconv("gbk","utf-8","路径");
再使用fopen函数打开这个路径
要用$path = iconv("gbk","utf-8","路径");
再使用fopen函数打开这个路径
追问
在哪里添加?
追答
fopen的时候
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |