new_jersey718
Coder
Hi, I am using VS Code on mac and trying to upload files using PHP code. It throws these errors :
Is it because of some access restrictions ? How can i fix it? The array suggests that the file uploads but then fails to move into 'uploads/' directory on my localserver ?
Code:
Array ( [image] => Array ( [name] => 29264.png [full_path] => 29264.png [type] => image/png [tmp_name] => /private/var/folders/xy/4zn42ksx24z85lcrntm9tg2m0000gn/T/phpu5UVAK [error] => 0 [size] => 6604 ) ) File is an image - image/png.
Warning: move_uploaded_file(uploads/29264.png): Failed to open stream: No such file or directory in /Users/anton/Desktop/php_classes/index.php on line 283
Warning: move_uploaded_file(): Unable to move "/private/var/folders/xy/4zn42ksx24z85lcrntm9tg2m0000gn/T/phpu5UVAK" to "uploads/29264.png" in /Users/anton/Desktop/php_classes/index.php on line 283
Sorry, there was an error uploading your file.
Is it because of some access restrictions ? How can i fix it? The array suggests that the file uploads but then fails to move into 'uploads/' directory on my localserver ?
Last edited by a moderator: