Uploading Files
| From: | Tom Wollaston | Date: | Tue, 24 Feb 2004 22:53:17 +0000 |
| Subject: | Uploading Files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178782@lists.php.net to get a copy of this message | ||
Hi
I am trying to write a cript for some file uploading.
So far I have come up wth:
<?php
if($userfile) {
copy($userfile, '/home/sites/site176/web/makeit/$userfile_name');
echo "Successfully Added!<br>\n";
}
?>
<form action="<?php echo $PHP_SELF ?>" method="post"
name="upload">
File to Upload: <input type=file name=userfile><BR>
<input type=submit value="Upload">
</form>
This seems to be fine except it cannot seem to find the file its trying to
upload. It says it doesn't exsist.
Can anybody see a reason why??
Tom Wollaston