[thelist] PHP file_put_contents help

Ken Snyder ksnyder at coremr.com
Tue Jan 23 12:22:40 CST 2007


Pringle, Ron wrote:
[...]
> file_put_contents($filename,fopen($weatherdata, "rb"), LOCK_EX);
>   
[...]

fopen returns a resource, and file_put_contents accepts a string in the 
second parameter.  Try something like this:

file_put_contents($filename,file_get_contents($weatherdata));


http://php.net/fopen
http://php.net/file_put_contents
http://php.net/file_get_contents


-- Ken





More information about the thelist mailing list