RE: [PHP-WINDOWS] How I got PHP under Windows to upload a file
| From: | Jordi Marquès. | Date: | Mon, 26 Jun 2000 13:26:04 +0000 |
| Subject: | RE: [PHP-WINDOWS] How I got PHP under Windows to upload a file | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-650@lists.php.net to get a copy of this message | ||
Hello Adrian,
I have the same problem, when I tried to execute this command:
copy ($uploadedfile, "c:\\$uploadedfile_name");
I have this error
Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php3' for reading: No such file
or directory in C:\WebShare\wwwroot\p5\up24.php on line 18
Now with php4 I think the 'C:\\WINDOWS\\TEMP\\php3' for reading has change
to php3, before install php4 the error was 'C:\\WINDOWS\\TEMP\\php2'
I don't know what more can i do.
I have tried to put to all directories windows, system I have touch the
registers like the manuals have told me.
Please If you could comment what did you exactly ... :(((((((((, step by
step with all the details pleeeeeeaaaaseeeeee.
I have installed php woriking fine I think becouse I only have a problem the
upload, with pws and w98, I have windows 2000 professional and his IIS 5, I
installed php there and I had the same problem,
Thank you very much !
----- Original Message -----
From: Adrian Teasdale <adrian@inovica.com>
To: <php-windows@lists.php.net>
Sent: Saturday, June 24, 2000 12:42 AM
Subject: [PHP-WINDOWS] How I got PHP under Windows to upload a file
> Hi all - just thought I'd put something back into the community :)
>
> I had a question a week or so ago about file uploads under Windows. I
have
> managed to solve this and I thought I would share this as the question
came
> up yesterday again....
>
> Within PHP.ini I put the file upload file settings to:
>
> upload_tmp_dir = /Windows/Temp/
>
>
> and then I tried this test code:
>
> <?
>
> // check for file upload
>
> if(isset($uploadedfile))
> {
>
> // copy the uploaded file to a different location - in this instance
> // to the c: drive.
> copy ($uploadedfile, "c:\\$uploadedfile_name");
>
> // just echo some variables back to the screen
> echo "local file: $uploadedfile<br>";
> echo "Name: $uploadedfile_name<br>";
> echo "size: $uploadedfile_size<br>";
> echo "Type: $uploadedfile_type<br>";
> }
> ?>
>
> <form action ="<?php echo $PHP_SELF ?>" method="post"
> ENCTYPE="multipart/form-data">
> <input type="hidden" name="MAX_FILE_SIZE" value="5000000">
> <input name="uploadedfile" type="file">
> <input type="submit" value="upload">
> </form>
>
> </body>
> </html>
>
> Make sure that you copy the file from the temp directory to wherever you
> want it to be before it is deleted!. I did this with:
>
> copy ($uploadedfile, "c:\\$uploadedfile_name");
>
> I hope that this helps someone out - this is a problem which has been
> bugging me now for around a year!!!!
>
> All the best to everyone and have a good weekend
>
> Ade
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>