Got the following problem.
I want to use mkdir to create a directory using the following code.
$userpath = strtolower("uploads/$var_username");
if (!is_dir($userpath)) { // Set / create the userdirectory
$oldumask = umask(0);
mkdir("uploads/test", 0777);
umask($oldumask);
}
Where $var_username = in this case terminator
I get the following error : Warning: mkdir(uploads/terminator): No such file or directory in /public_html/uploadsite/upload.php on line 27
Directory structure is
/public_html/uploadsite/
index.php - FILE
upload.php - FILE
uploads - DIR wich has 0777
Where upload.php is included by index.php. (also those both files have 0777).
So when I run index.php I get the error, when I run upload.php (standalone) I get the error, when I run upload.php in the uploads directory I get no error and the directory is created.
Any ideas ?
TIA