首页 > 解决方案 > file_exist() 不工作并阻止所有代码在其下执行

问题描述

就像标题说的,我被难住了。我过去多次成功使用此功能,但现在突然之间它根本不起作用。它上面的一切都将正常显示,它下面的一切都消失了。给定的文件路径是正确的,因为require在同一个文件上工作得很好。

//this works
require $_SERVER['DOCUMENT_ROOT']."/custom/phsh/includes/login.php";

//this doesn't return anything it just stops the code right here
echo file_exist($_SERVER['DOCUMENT_ROOT']."/custom/phsh/includes/login.php");

标签: phpsyntax-errorfile-exists

解决方案


这是一个拼写错误,我写了 file_exist(); 但它应该是 file_exists();


推荐阅读