UPLOAD !!!!!!!!!
| From: | abe | Date: | Thu, 10 Aug 2000 10:35:02 +0000 |
| Subject: | UPLOAD !!!!!!!!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11117@lists.php.net to get a copy of this message | ||
Hello people,
I am new to the list - so plese excuse me if my question is a little simple.
Anyway I am in desperate trouble - I am trying to get an upload function
working on my site. The wierd thing is that it works when I test it on my
browser (Netscape - on LINUX) but not on any PC's using IE or Netscape.
The error message I get is:
"Warning: unable to open '/tmp/none' for reading. No such file in
'***MY_DIRECTORY***/pucopy.php3'.
Failed to copy....".
CAN ANYONE HELP - The code is below - and we use Apache on Linux for server.
Thanks
Abe - PS code below:
The html form I am using is :
____________________________________________________________________
<html>
<head><title>Uploading test</title>
<body>
<FORM ENCTYPE="multipart/form-data" ACTION="putcopy.php3" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
</BODY></HTML>
The PHP script is :
__________________________________________________________________________
<html>
<head><title>Add News</title><meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFFFF">
<?php
$abetest = "/home/httpd/vhtdocs/testarea/intranet/abe000000";
$file = basename($userfile);
$upload_tmp_dir = "/tmp/";
if (!copy($upload_tmp_dir.$file, $abetest.'.html') ) {
print("failed to copy $file...<br>\n");
}
?>
</body>
</html>