I am not sure why this code is breaking
mkdir("upload/".$username.'/'.$title.'/', 0700);
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/".$username.'/'.$title.'/' . $_FILES["file"]["name"]);
echo "Stored in: " ."upload/".$username.'/'.$title.'/' . $_FILES["file"]["name"];
$link = "upload/".$username.'/'.$title.'/' . $_FILES["file"]["name"];
Here are my errors
Warning: mkdir() [function.mkdir]: No such file or directory in /Volumes/shared/Digital/_Websites/_TEST/qpm/submit.php on line 101
Warning: move_uploaded_file(upload/test/test/Hand Over.docx) [function.move-uploaded-file]: failed to open stream: No such file or directory in /Volumes/shared/Digital/_Websites/_TEST/qpm/submit.php on line 103
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/MAMP/tmp/php/phpYvo5b5' to 'upload/test/test/Hand Over.docx' in /Volumes/shared/Digital/_Websites/_TEST/qpm/submit.php on line 103 Stored in: upload/test/test/Hand Over.docx1 record added
I;m sure i had this working and now I have somehow broke it?
the echo stored in echos the correct string so not sure why the mkdir is failing, apologies if this a simple fix
$_FILES["file"]["name"]to create files on your system.mkdir()has 3rd parameter called$recursive. Set it totrueif you are generating multilevel directories.