On Tuesday 02 July 2002 23:54, Tyler Longren wrote:

> that worked.  I had to use _FILES instead of _POST
>
> I still get these errors though:
> "Warning: fopen("", "r") - Success in
> /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 151
>
> Warning: stat failed for (errno=2 - No such file or directory) in
> /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line 151
>
> Warning: fread(): supplied argument is not a valid File-Handle resource
> in /usr/local/apache/htdocs/cj/aanr/admin/passcode_admin.php on line
> 151"
>
> And here's the line that produces them:
> $data = fread(fopen("$_FILES[passcodeFile_name]", "r"),
> filesize("$_FILES[passcodeFile]"));
>
> any ideas on that one?  This is the problem I have been working on for a
> few days now.

My understanding of the file upload process is that the uploaded file get 
written to a tmp directory under a tmp filename. It is your responsibility to 
match this tmp filename with the real filename and copy it somewhere (or do 
something with it) because as soon as the script ends the tmp files will be 
deleted. 

Please, do yourself a favour -- study the examples in the manual and save 
yourself a few more days of grief :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Would the last person to leave Michigan please turn out the lights?
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to