RE: [PHP-WINDOWS] How I got PHP under Windows to upload a file

From: Date: Mon, 26 Jun 2000 14:10:50 +0000
Subject: RE: [PHP-WINDOWS] How I got PHP under Windows to upload a file
Groups: php.windows 
Request: Send a blank email to php-windows+get-655@lists.php.net to get a copy of this message
I've just been playing around on a windows machine running win 95 and php3.. I've got it working using . as the tmp dir. Give that a go. I've tried every other way on 9x with no success until now, Although NT worked first time. M@X --- "Jordi_Marquès." <trespi@interwatts.com> wrote: > windows 98 and pws > ----- Original Message ----- > From: Maxwell Hung <maxwell_hung@yahoo.com> > To: Adrian Teasdale <adrian@inovica.com>; > <php-windows@lists.php.net> > Sent: Monday, June 26, 2000 2:15 PM > Subject: Re: [PHP-WINDOWS] How I got PHP under > Windows to upload a file > > > > which version of windows is this using?? > > It doesn't work with apache on win95. > > M@X > > --- Adrian Teasdale <adrian@inovica.com> wrote: > > 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 > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Get Yahoo! Mail - Free email you can access from > anywhere! > > http://mail.yahoo.com/ > > > > -- > > 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 > > > > > __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.windows (#655) next »