is_really_writable($file)
Parameters: |
|
---|---|
Returns: |
TRUE if the path is writable, FALSE if not |
Return type: |
bool |
is_writable()
returns TRUE on Windows servers when you really can’t write to the file as the OS reports to PHP as FALSE only if the read-only attribute is marked.
This function determines if a file is actually writable by attempting to write to it first. Generally only recommended on platforms where this information may be unreliable.
Example:
if (is_really_writable('file.txt')) { echo "I could write to this if I wanted to"; } else { echo "File is not writable"; }
Note
See also PHP bug #54709 for more info.
Please login to continue.