gpt4 book ai didi

对于具有外语字符的文件名,php 的 file_exists 返回 false

转载 作者:搜寻专家 更新时间:2023-10-31 21:36:44 25 4
gpt4 key购买 nike

$file_name = "x:/htdocs/host/sales_documents/testvilkår, webhotell og domenenavn_2ccda.pdf";

if(!file_exists($file_name))
{
echo "<h2>404 Error</h2>";
exit;
}

文件名是一个有效的文件并且它确实存在,但是 file_exists 仍然返回 false
你能告诉我背后的原因是什么吗?

最佳答案

检查你的文件路径。你的代码没问题。

关于对于具有外语字符的文件名,php 的 file_exists 返回 false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17502236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com