Forum Moderators: coopster

Message Too Old, No Replies

file get contents issue.

         

rokec

3:14 pm on Dec 24, 2006 (gmt 0)

10+ Year Member



In folder WWW i have text file named news.txt. I'm calling file_get_contents("news.txt"); form index.php in the same folder. I got error:

Warning: file_get_contents(news.txt): failed to open stream: No such file or directory in /home/www/index.php on line 14

What's wrong?

eelixduppy

3:51 pm on Dec 24, 2006 (gmt 0)



Everything looks good however it still says that it cannot find the file.

I would check your spelling, as well as capitalization, on the filenames and make sure that the path is truly the path that you say it is.

Other than that I don't know what to say. Maybe test is with another file?

Good luck!

mcavic

5:51 pm on Dec 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try using a full path name, and make sure that the text file is world-readable.