problem in uploading !

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

problem in uploading !

Post by itsmani1 »

Code: Select all

<?PHP
$file = $_FILES&#1111;"file"];
if (is_uploaded_file($HTTP_POST_FILES&#1111;"file"])) &#123;
    copy($HTTP_POST_FILES&#1111;"file"], "C://Temp");
&#125; else &#123;
    echo "Uploaf Failed - ". $file;
&#125;
?>
using the above code i m trying to upload a file @C://Temp but its not working, can any fix it for me!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<?PHP
$file = $_FILES&#1111;"file"];
if (is_uploaded_file($_FILES&#1111;"file"]&#1111;'tmp_name'])) &#123;
    move_uploaded_file($_FILES&#1111;"file"]&#1111;'tmp_name'], "C:/Temp/&#123;$file&#125;");
&#125; else &#123;
    echo "Upload Failed - ". $file;
&#125;
?>
something more like this..
Post Reply