Re: reading in files

From: Date: Wed, 23 Jul 2003 09:48:59 +0000
Subject: Re: reading in files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156408@lists.php.net to get a copy of this message
www.php.net/uploads 1. use $_FILES 2. $_FILES['file'] would be na array holding info about the uploded file bob pilly wrote:
Hello all I have a page where a user uses a browse button in html to upload a file from there client pc. They then click upload which submits the form to the second page: example <form name="form1" method="post" action="/test2.php"> <input type="file" name="file"> <input name="upload" type="submit" id="upload" value="upload"> </form> I am then wanting to read the info in that file in the test2.php page but are struggling. At the moment im trying to use: $file=file($_GET[file]); echo $file[0]; which i thought would output the first line of the file but it doesnt. Can someone point me to some good docs on how php deals with files and how i can readthrough the file uploaded from a user please? Thanks for any help in advance! --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


« previous php.general (#156408) next »