skull256 Posted May 10, 2007 Share Posted May 10, 2007 So, I have this snippet of code. $filepath = 'resources/repertoire.txt'; $lines = file($filepath); ... $fileExists = file_exists($filepath); ... $lines now contains an array of the lines from the given file path, but $fileExists contains FALSE. What am I missing? --m. Quote Link to comment https://forums.phpfreaks.com/topic/50847-solved-php-file-and-file_exists-disagree/ Share on other sites More sharing options...
MadTechie Posted May 10, 2007 Share Posted May 10, 2007 file_exists FALSE for files inaccessible due to safe mode restrictions. However these files still can be included if they are located in safe_mode_include_dir. also we're need to see the middle part of the code! Quote Link to comment https://forums.phpfreaks.com/topic/50847-solved-php-file-and-file_exists-disagree/#findComment-250075 Share on other sites More sharing options...
skull256 Posted May 10, 2007 Author Share Posted May 10, 2007 Only after you've posted your code and made an ass of yourself does the problem work itself out. Thanks for the fast reply, though! It seems the actual problem is that fopen($filepath, 'w') fails. I'm assuming this is a permissions problem, because fopen($filepath, 'r') works. I'm a total noob at session authentication, so if anyone can point me in the right direction as to how I can educate myself on the subject, please hit me back! --m. Quote Link to comment https://forums.phpfreaks.com/topic/50847-solved-php-file-and-file_exists-disagree/#findComment-250081 Share on other sites More sharing options...
MadTechie Posted May 10, 2007 Share Posted May 10, 2007 LOL you need to chmod the folder your working inn (0777 = full access) you can do this via FTP access (normally right click) Quote Link to comment https://forums.phpfreaks.com/topic/50847-solved-php-file-and-file_exists-disagree/#findComment-250083 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.