PDA

View Full Version : hmm upload stuff



Jamie.
29-07-2007, 03:48 PM
// Define the upload location
$target_path = "photos";

// Create the file name with path
$target_path = $target_path . basename( $_FILES['upfile']['name']);

// Try to move the file from the temporay directory to the defined.
if(move_uploaded_file($_FILES['upfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['upfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}

whats wrong with this :s it keeps saying there was an error uploading the file please try again im not too sure if ive done it right :S

Coldplay
29-07-2007, 03:54 PM
Your server may be experiencing difficulties. Try and check.

Jamie.
29-07-2007, 04:00 PM
true didnt think about that, i see u everywhere your haunting me!!!!

Jamie.
29-07-2007, 04:33 PM
FIXED. close pls.

Invent
29-07-2007, 05:50 PM
Wait, so you're making a usersystem, and you have to follow a tutorial to make an upload script?

Want to hide these adverts? Register an account for free!