I have an image browser that creates thumbnails, but I cannot call 'mkdir' to create a directory in my code to put my thumbnails in. I have tried to call 'chmod' on the parent directory as well as the top level directory, but I'm DENIED.
Does this webhost not allow those functions to be called or something?
My code is as follows:
// make the thumbnail directory
if ( !(chmod('.', 0777)) )
echo 'Could not change the directory\'s permissions.<br>';
// temporarily change parent permissions
if ( !chmod('/public_html', 0777) )
echo 'Could not change top-level directory permissions.<br>';
// change them back
if ( !chmod('/public_html', 0775) )
echo 'Could not change top-level directory permissions back.<br>';
if ( !(mkdir( './thumbnails/', 0777, true )) )
echo 'Could not create directory: ' . $this->path;
echo '<br>Thumbnails cannot be created.';