I am a little bit confuse and have a headache to find the upload file problem. I have the PHP script which is contained a simple code of uploading file. Below is my script:
$file_path = "doc_student/";
$image = $final_save_dir . $_FILES['uploadFile']['name'];
if($_FILES['uploadFile']['error'] > 0):
echo "Error: " . $_FILES['uploadFile']['error']. "<br>";
else:
echo "Upload: " .$_FILES['uploadFile']['name'] . "<br>";
echo "Type: " .$_FILES['uploadFile']['type'] . "<br>";
echo "Size: " .($_FILES['uploadFile']['size'] / 1024) . "kb<br>";
echo "Stored in: " .move_uploaded_file($_FILES['uploadFile']['tmp_name'], $file_path . $_FILES['uploadFile']['name']) . "<br>";
endif;
Everything's worked fine except the file that I upload is not move to the $file_path = "doc_student/"
.
one of my friend told me to give a proper permission to allow my files upload to the folder as I given below but how to give a permission in Ubuntu?