TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-11-2008, 07:08 AM   #1 (permalink)
The Wanderer
 
galleeandfarel's Avatar
 
Join Date: Jun 2008
Posts: 15
Thanks: 4
galleeandfarel is on a distinguished road
Default 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......
galleeandfarel is offline  
Reply With Quote
Old 07-11-2008, 10:31 AM   #2 (permalink)
The Wanderer
 
Join Date: Jul 2008
Location: Germany
Posts: 20
Thanks: 0
netsnake is on a distinguished road
Default

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
__________________
Heaven for searching -> Xooria.com
Note: Please don't blame me for my English... 4 Years of it at school don't make it perfect! But feel free correct me!
Send a message via Skype™ to netsnake
netsnake is offline  
Reply With Quote
Old 07-11-2008, 11:23 AM   #3 (permalink)
The Wanderer
 
galleeandfarel's Avatar
 
Join Date: Jun 2008
Posts: 15
Thanks: 4
galleeandfarel is on a distinguished road
Default

thank for the reply dude...ive changed "$HTTP_POST_FILES" to "$_FILES"....it is working now.....
galleeandfarel is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:22 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design