Quick Tip: file_put_contents() permissions in PHP
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().
Tags: Permissions, PHP, File_put_contents, QuickTip