Can`t create file using fopen PHP

Total Views: 1436
Current Rating: (Out of 5 Light Bulbs)
Not Yet Rated.

If you are trying to create a file in PHP (Linux), make sure the folder you are writing to has permissions 755.

To change the permissions, you could use an FTP client and right click the directory you wish to write into. Usually there is a permissions option somewhere and change that to 755.

If not, try running this script against your PHP server

chmod("/path/to/filename", 0755);

Keywords: pho fopen can`t write to directory

Related Solutions