<?php
require_once 'test中文.php';
C:\ WNMP \ PHP \的php.exe C:\ WNMP \ HTML \臨河\ test0.phpPHP的包括中國名
PHP Warning: require_once(test中文.php): failed to open stream: No such file or directory in C:\Wnmp\html\linhe\test0.php on line 4
PHP堆棧跟蹤:
PHP 1. {main}() C:\Wnmp\html\linhe\test0.php:0
PHP Fatal error: require_once(): Failed opening required 'test中文.php' (include_path='.;C:\Wnmp\php\pear') in C:\Wnmp\html\linhe\test0.php on line 4
PHP堆棧跟蹤:
PHP 1. {main}() C:\Wnmp\html\linhe\test0.php:0
處理完成退出代碼255
我知道的東西: test中文.php是一個空白文件;
與梨沒有關係。
包括英文文件名是好的!
謝謝!
是的!我試過$ s ='test中文.php'; $ s = mb_convert_encoding($ s,'GB2312'); require_once $ s; – 2014-12-04 05:54:32
嗨,請問另一個問題,我怎麼知道os文件系統的字符集!謝謝 – 2014-12-04 09:15:15
功能編碼($ file_name){ if('WINNT'== PHP_OS) return mb_convert_encoding($ file_name,'GB18030'); return $ file_name; } – 2014-12-04 09:39:01