File upload
| From: | Balaji Ankem | Date: | Thu, 07 Feb 2002 04:50:06 +0000 |
| Subject: | File upload | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83809@lists.php.net to get a copy of this message | ||
Hi,
I am trying to upload a file from remote machine.
Could you please help out me.
Thanks in advance
-Balaji
------------
upload.html
-------------
<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<TITLE>
FileUpload
</TITLE>
<BODY>
<center>
<form action='upload.php' method='post'
enctype='multipart/form-data'>
<br><br><br>
File: <input type='file' name='path'>
<input type='submit' value='UPLOAD'>
</form>
</center>
</BODY>
</HTML>
----------------
upload.php
----------------
<?php
echo "Path: $path <BR>";
$file=basename($path);
echo "File name : $file";
if(copy($file,$path)){
echo "$file <br>$path";
print "<font face='verdana' size='2'
class='text_size_9'>Your file has been
uploaded!!!</font><br><br>" ;
}
else
{
print "<font face='verdana' size='2' class='text_size_9'>A
problem was
encountered during your file upload.</font><br>";
}
?>
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ********************************************************************
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ********************************************************************