SeanColombo.com


Quick Tip: file_put_contents() permissions in PHP

Posted in Programming by Sean on the December 18th, 2007

Another quick tip that will hopefully be helpful to someone. When using “file_put_contents” on a directory that has full write permissions, you may still get “Permission denied” errors. It turns out that in PHP (at least in some cases, not sure if it is always), you need to have execution permissions on the destination directories also (chmod them to 777) in order to be able to write to them using file_put_contents().

Leave a Reply