I am using codeigniter-3 framework , i am getting file from the request i want to store that image inside the particular folder for that i am using move_upload_file() but it's not working can you please help me did i miss anything ..?
$original_filename = $_FILES['file']['name'];
$file_tmp = $_FILES['file']['tmp_name'];
move_uploaded_file($file_tmp, "profile_image/" . $original_filename);
directory
ProjectName
-profile_image
CodePudding user response:
- Check the permissions of the directory "profile_image" - you need write permissions.
- You entered a relative directory path - check if the current working directory is "ProjectName".