|
Posted by Rik on 10/17/06 19:59
mantrid wrote:
> I have some code to upload files to my site. it works when the <input
> type="file" > is posted once even when I use session variables from
> the posted variables but when I carry those session variables to a
> new page the upload will not work. despite the variables being set. I
> have echoed then on the second page and they display correctly but
> they just dont work in the move_uploaded_file() function. I get the
> error message
I haven't read the code, but I suspect the problem is this:
1. The user uploads the file.
2. File arrives perfectly.
3. Session variables are set. ($_SESSION['files'] = $_FILES;)
4. File is DELETED from the temp directory because the request ends.
5. Second page comes up, with perfect session variables, but the files are
no longer there.
In this case, you'd have to move it to your own custom tmp directory first,
which you will have to clean up, because the server won't do that anymore
for you.
Another option is you use $_SESSION = $_FILES. Don't. Set it in a specific
$_SESSION key.
Grtz,
--
Rik Wasmus
[Back to original message]
|