file_exists(
을 사용할 때 항상 false를 반환합니다. 그러나 파일은 실제로 존재하며 require
을 사용하여로드 할 수 있습니다. 내가 페이지, 페이지 항상 exit()
를로드 할 때file_exists가 항상 false를 반환하는 이유는 무엇입니까?
// Creating dependency lists.
$data_dependency = array("mysql", "oracle", "postgresql", "sqlite", "access");
// Calling the dependecny files.
foreach ($data_dependency as $list) {
$list = "class.data.$list.php";
_system::debug("Calling required class $list ...");
if (file_exists($list)) {
include($list);
_system::debug("Calling $list was successfull.");
} else {
_system::debug("Calling $list was failed. Now we close the system load.");
exit("Calling $list was failed. Now we close the system load.");
}
}
: 이것은 내 코드입니다. 그 이유는 file_exists()
함수가 항상 false를 반환한다고 생각합니다.
절대 경로를 사용해보십시오. – C9HDN
당신은 단수형 파일이 있다고 말하지만 어느 것이 든 존재하지 않는다면 5를 찾고 있습니다. – Crisp
@Calum - 절대 경로를 사용하려고 시도했지만 여전히 false입니다. –