Jump to content

Uploader Error


Chikwado
 Share

Recommended Posts

Some one check this: the following php code is returning error that is:

$target_path = "magazine/";
$target_path = $target_path .basename($_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'])) {
echo "The file" .basename($_FILES['uploadedfile'] ['name']) ."has been uploaded";
}else{                                     echo "the file" .basename($_FILES['uploadedfile'] ['name']) ."was not uploaded";       }
The file can be found here http://chiquado.site90.net/magazine some one help. Edited by Chikwado
Link to comment
Share on other sites

I have noticed an error in your move_uploaded_file function. It is coded as

 

move_uploaded_file (a, b );

 

where

a - is the temporary location of the uploaded file on the server ($_FILES['uploadedfile']['tmp_name']) - Which you didn't specify

and

b - is the target location of your uploaded file.

Edited by Techneut
Link to comment
Share on other sites

@OP

as an aside, you should really learn to use code tags properly. it's more practical to put all the code in your post in one code tag block. (unless they are in different files, then separate code tag blocks is appropriate)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...