Uploading files
| From: | Tyler Longren | Date: | Thu, 27 Jun 2002 14:37:10 +0000 |
| Subject: | Uploading files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104171@lists.php.net to get a copy of this message | ||
Hello,
I usually use this code to upload files when I have a form with <input
type=file name=passcodeFile>
It no longer works for some reason:
$data = fread(fopen("$_POST[passcodeFile]", "r"),
filesize("$_POST[passcodeFile]"));
Here are the errors that it produces:
Warning: fopen("", "r") - Success in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146
Warning: stat failed for (errno=2 - No such file or directory) in
/usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146
Warning: fread(): supplied argument is not a valid File-Handle resource
in /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 146
The "$data =" line is line number 146. Does anyone seen anything wrong
with this?
Thanks,
--
Tyler Longren
Captain Jack Communications
tyler@captainjack.com
www.captainjack.com