Uploading File Trouble.
Posted: Thu Jun 29, 2006 7:07 pm
I have check everything. Safe Mode is off, my permissions seem correct, and I'm using the right syntax. I am still getting error messages when trying to upload a file onto the server.
I am using php 5: Here are the errors
Warning: move_uploaded_file(./wwwroot/karisumusic/dbpictures/glopez.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\SWsoft\PEM\CustomerData\webspaces\webspace_00002119\wwwroot\karisumusic\uploadpicture.php on line 15
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\TEMP\php4DA6.tmp' to './wwwroot/karisumusic/dbpictures/glopez.gif' in C:\SWsoft\PEM\CustomerData\webspaces\webspace_00002119\wwwroot\karisumusic\uploadpicture.php on line 15
I have tried so much, if someone knows of any solutions PLEASE let a brother know.
Here is my code:
I am using php 5: Here are the errors
Warning: move_uploaded_file(./wwwroot/karisumusic/dbpictures/glopez.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\SWsoft\PEM\CustomerData\webspaces\webspace_00002119\wwwroot\karisumusic\uploadpicture.php on line 15
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\TEMP\php4DA6.tmp' to './wwwroot/karisumusic/dbpictures/glopez.gif' in C:\SWsoft\PEM\CustomerData\webspaces\webspace_00002119\wwwroot\karisumusic\uploadpicture.php on line 15
I have tried so much, if someone knows of any solutions PLEASE let a brother know.
Here is my code:
Code: Select all
<?php
$uploaddir = './wwwroot/karisumusic/dbpictures/';
$uploadfile = "$uploaddir" . $_FILES['userfile']['name'];
if (move_uploaded_file($_FILES['userfile']['tmp_name'], "$uploadfile")) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
?>