if(file_exists( $_SERVER['DOCUMENT_ROOT'] . "/index.html")) echo '文件存在';
当文件的所有者和组设置为 root:root 时,仅返回“文件存在”。如果我将其更改为hostingacc:psacln 或hostingacc:psaserv,它将不再起作用。
请问有办法解决吗?
最佳答案
更改根目录的所有者。
chown -r hostingacc:psacln .
关于PHP file_exists 仅适用于 root :root,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22860513/