I am having problems with a picture uploading script.
I know there are hundreds of the same questions, but I haven't found the one that would be work for me.
$upload_dir = "images/postcards/";
chmod($upload_dir, 777);
if (is_writable($upload_dir)) {
echo 'The file is writable';
} else {
echo 'The file is not writable';
}
This always returns that the file is "not writable"
I tried setting chmod
to 0777
and -rwxrwxrwx
. But result was always the same. Any Ideas?
777
it is incorrect. you should always prefix with0
check here chmod. – Chipper