简体   繁体   English

file_exists() 的问题 function

[英]Problems with file_exists() function

I have one page using this function to check if one file is on folder, recently i changed my server and the page started show some problems, i don't know why, but this verification not run well.我有一页使用这个 function 来检查一个文件是否在文件夹中,最近我更改了我的服务器并且页面开始显示一些问题,我不知道为什么,但是这个验证运行得不好。

the code is:代码是:

$path ="../folder/file.tif";

if(file_exists($path)){
echo "file is ok";
} 

Anyone ever had this problem?有人遇到过这个问题吗?

Tks Tks

If safe_mode restrictions have been enabled on the server, you may run into trouble when the owner of the folder directory or the file itself is different than the one running PHP.如果服务器上启用了安全模式限制,当folder目录或文件本身的所有者与运行 PHP 的所有者不同时,您可能会遇到麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM