note 79276 added to function.move-uploaded-file

From: Date: Mon, 19 Nov 2007 11:26:50 +0000
Subject: note 79276 added to function.move-uploaded-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-132397@lists.php.net to get a copy of this message
I am trying to upload a file with my IIS server. Here is the code i am using presently, however it doesnt seems to be working for me. Kindly help me if possible: <form action="multiupload.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"] . "<br />"; /*if (move_uploaded_file($_FILES["file"]["tmp_name"], "C:\Inetpub\wwwroot\upload\upload\" . $_FILES["file"]["name"])) { echo "Stored in: " . "C:\Inetpub\wwwroot\upload\upload\" . $_FILES["file"]["name"]; } else { echo "Problem in upload"; }*/ } ?> If I try to run the code by uncommenting the move_uploaded_file command, the script fails. Also i am unable to find the temporary file in the path, which it returns for temporary file. ---- Server IP: 208.69.120.35 Probable Submitter: 148.87.1.172 ---- Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php Edit -- https://master.php.net/note/edit/79276 Del: integrated -- https://master.php.net/note/delete/79276/integrated Del: useless -- https://master.php.net/note/delete/79276/useless Del: bad code -- https://master.php.net/note/delete/79276/bad+code Del: spam -- https://master.php.net/note/delete/79276/spam Del: non-english -- https://master.php.net/note/delete/79276/non-english Del: in docs -- https://master.php.net/note/delete/79276/in+docs Del: other reasons-- https://master.php.net/note/delete/79276 Reject -- https://master.php.net/note/reject/79276 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132397) next »