reading in files
| From: | bob pilly | Date: | Wed, 23 Jul 2003 09:39:04 +0000 |
| Subject: | reading in files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156405@lists.php.net to get a copy of this message | ||
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