Php – How to check if a directory is writeable in PHP

directorypermissionsphp

Does anyone know how I can check to see if a directory is writeable in PHP?

The function is_writable doesn't work for folders.

Edit: It does work. See the accepted answer.

Best Solution

Yes, it does work for folders....

Returns TRUE if the filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable.