Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- file_put_contents problem
June 25, 2008, 3:42 pm
rate this thread
I'm trying to get a file on the internet and put it on my server...
file_get_contents doesn't seem to give any problem...
anyway, this is the response I get:
<b>Warning</b>: file_put_contents(RSS_news/bbc.xml) [<a
</a>]: failed to open stream: No such file or directory in <b>/var/www/
/rss_bbc.php</b> on line <b>9</b><br />"
and line 9 of that file is exactly the unique row of code:
My PHP Version is 5.2.3-1
thanks in advance
PS: the unique thing I need to do with this function is take a file on
the internet and copying it on my server... and then I'll do something
June 25, 2008, 4:23 pm
Re: file_put_contents problem
Does PHP have permission to create files in
"/var/www/exist/Eclipse/thebigone/server_scripts"? If PHP runs as Apache
module then the "server_scripts" directory needs to have write
permission for the user Apache runs as (typically "nobody" or "apache").
You can probably change permissions with your FTP client. I suggest you
create a special folder for these downloads so you don't need to make
server_scripts itself writable.
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
- » File Upload - how do I get full path, or cache a reference?
- — Next thread in » PHP Scripting Forum
- » Stop hotlinking to a specific file & keeping a counter
- — Previous thread in » PHP Scripting Forum