无法使用PHP file_get_contents读取带有重音字符的本地文件

时间:2016-12-14 23:19:34

标签: php windows encoding file-get-contents non-ascii-characters

我正在尝试做一些简单的事情,但它不会让我。我有这段代码:

$get = file_get_contents("resumé.html");

但是我收到了这个错误消息:

Warning: file_get_contents(resumé.html): failed to open stream: No such file or directory in C:\wamp\www\mysite\index.php on line 36

看来我无法打开/读取带有外国/重音字符的文件,我不知道为什么。我尝试使用mb_convert_encoding()urlencode()等功能,但它们不起作用..

那么,如果不将我的文件重命名为resume.html,我该如何做呢?

0 个答案:

没有答案