April 22, 201214 yr Hello; I have coded a upload page using php. Everything works fine and there is no problem in code. But when i upload the file and submit it i get successful upload and no error. After this when i go to that particular folder to see the uploaded file, i'm not able to see the file. I tried changing the folder location but still i can see the uploaded file. No problem with folder permission but still i cant find the uploaded file please help me. Result after uploading file: Array ( [name] => bg.jpg [type] => image/jpeg [tmp_name] => C:\xampp\tmp\phpE1.tmp [error] => 0 => 3634 )
April 22, 201214 yr Lol. Best quote ever If your coding a file upload and you don;t see the actual uploaded file, I;d say there's a pretty major issue somewhere. ...but there is no problem with the code jokes
April 22, 201214 yr Result after uploading file: Array ( [name] => bg.jpg [type] => image/jpeg [tmp_name] => C:\xampp\tmp\phpE1.tmp [error] => 0 => 3634 ) Seriously though, how do you expect people to help debug your code if you don't show it?
April 23, 201214 yr <?php echo $_SESSION['user']; $file=$_FILES["file"]["name"]; //$_FILES["file"]["name"]-De naam van de geuploaded bestand //$_FILES["file"]["type"]-De type van het geuploaded bestand //$_FILES["file"]["size"]-De grote van de geuploade bestanden in bytes //$_FILES["file"]["tmp_name"]-De naam van de tijdelijke geplaatse kopie op de server //$_FILES["file"]["error"]-De fout code resultaat van de geuploaded bestand { move_uploaded_file($_FILES["file"]["tmp_name"], "C:\wamp\www\k/".$_FILES["file"]["name"]); } ?> Here this is what you need. It´s a small learning script from mine self. once the file has been uploaded, it needs to be saved as well. After the upload, the file is only temporarily saved, hence the name of tmp_name. Keep an lookout for the global $_FILES["file"][""] syntax's of how it works.
April 24, 201214 yr Author <?php echo $_SESSION['user']; $file=$_FILES["file"]["name"]; //$_FILES["file"]["name"]-De naam van de geuploaded bestand //$_FILES["file"]["type"]-De type van het geuploaded bestand //$_FILES["file"]["size"]-De grote van de geuploade bestanden in bytes //$_FILES["file"]["tmp_name"]-De naam van de tijdelijke geplaatse kopie op de server //$_FILES["file"]["error"]-De fout code resultaat van de geuploaded bestand { move_uploaded_file($_FILES["file"]["tmp_name"], "C:\wamp\www\k/".$_FILES["file"]["name"]); } ?> Here this is what you need. It´s a small learning script from mine self. once the file has been uploaded, it needs to be saved as well. After the upload, the file is only temporarily saved, hence the name of tmp_name. Keep an lookout for the global $_FILES["file"][""] syntax's of how it works. Thank you so much i sorted out the problem.
Create an account or sign in to comment