PHP File Exists Always False
- by Joe
I have a case where file_exists() is always returning false. My latest attempt was to just test to see if it would return true for $_SERVER["SCRIPT_FILENAME"] and then return the value of the path if it couldn't find the file which it does.
The path while not necessarily relevant to solving the problem is: /Users/joe/Workspace/720/app/webroot/index.php
I have obviously verified that the file is there, and am not even sure how it couldn't be there since php is serving it up.
I should mention this is on an install of OS X Snow Leopard running PHP 5.3.0.
Any ideas would be fantastic.
CODE SAMPLE:
if (!file_exists($_SERVER["SCRIPT_FILENAME"]))
$errors[] = 'Cant find:'. $_SERVER["SCRIPT_FILENAME"];