Chikwado Posted April 17, 2015 Share Posted April 17, 2015 (edited) 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 April 24, 2015 by Chikwado Link to comment Share on other sites More sharing options...
Techneut Posted April 17, 2015 Share Posted April 17, 2015 (edited) 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 April 17, 2015 by Techneut Link to comment Share on other sites More sharing options...
thescientist Posted April 18, 2015 Share Posted April 18, 2015 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now