file upload problem
| From: | Ram K | Date: | Thu, 05 Sep 2002 18:13:08 +0000 |
| Subject: | file upload problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-115344@lists.php.net to get a copy of this message | ||
Hey
I have a prob with my php file upload. i am using windows
my html file looks like
----
<HTML>
<HEAD></HEAD>
<BODY>
<FORM ACTION="upload1.php3" METHOD="post" ENCTYPE="multipart/form-data">
Upload the datafile here
<INPUT TYPE="file" NAME="file">
<br><br>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</FORM>
</BODY>
</HTML>
----
my php file looks like
----
<?
$endresult = "File Was Uploaded";
$newfile = "C:\\upload\\".$file_name;
echo $newfile."<br>";
echo $file."<br>";
@copy($file, $newfile) or $endresult = "Couldn't Copy File To Server";
echo $endresult;
?>
----
when i run i get an error
\\php2
c:\upload\a.gif
cannot upload file
any ideas why?? also i am not clear as to where the \\php2 comes from
thanks in advance
regards
ram
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/