Jump to content
MakeWebGames

Recommended Posts

Posted

Im having problem with this code...

 

<?php 
$name = $_FILES['uploaded']['name'];
$target = "files/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file $name has been uploaded!
Link: http://rippedgfx.co.cc/files/$name";
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
?>

 

Can you help?

Posted

I get this error.

 

Warning: move_uploaded_file(files/Chrysanthemum.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/********/public_html/***************/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phptPkWAH' to 'files/Chrysanthemum.jpg' in /home/********/public_html/***************/upload.php on line 6

Sorry, there was a problem uploading your file.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...