![]() |
upload file
my design code is
<form action="upload.php" method="post" enctype="multipart/form-data"> File: <input type="file" name="filename" /> <input type="submit" value="Upload" /> </form> php code is <?php $folder = "C:\wamp\www\vgotjobs\upload"; if (is_uploaded_file($HTTP_POST_FILES['filename']['tmp_name'])) { if (move_uploaded_file($HTTP_POST_FILES['filename']['tmp_name'],$folder.$HTTP_POST_FILES['filename']['name'])) { Echo "File uploaded"; } else { Echo "File not moved to destination folder. Check permissions"; }; } else { Echo "File is not uploaded."; }; ?> above are my upload php codes, when i run in the localhost,it tells "FILE IS NOT UPLODED" plz give me a hint to upload files in my temp folder...... |
try replacing $HTTP_POST_FILES['filename']['tmp_name'] by $HTTP_POST_FILES['tmp_name'] (in all cases, line 3, and both in 5)
Greez, netsnake |
thank for the reply dude...ive changed "$HTTP_POST_FILES" to "$_FILES"....it is working now.....:-)
|
| All times are GMT. The time now is 02:39 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0