RE: [PHP] file reading
| From: | Brad Dameron | Date: | Tue, 27 Aug 2002 18:16:44 +0000 |
| Subject: | RE: [PHP] file reading | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114273@lists.php.net to get a copy of this message | ||
'w+' - Open for reading and writing; place the file pointer at the beginning
of the file and truncate the file to zero length. If the file does not
exist, attempt to create it.
Change it to "r" since you are only reading. Also check to make sure your
pathing is correct.
---
Brad Dameron Network Account Executive
TSCNet Inc. www.tscnet.com
Silverdale, WA. 1-888-8TSCNET
> -----Original Message-----
> From: phper [mailto:ap_2000@www.com]
> Sent: Tuesday, August 27, 2002 2:03 PM
> To: php-general@lists.php.net
> Subject: [PHP] file reading
>
>
> how do I read the contents of a file.
>
> $FileStream = fopen("webmaster/forum".$Forum."/forumtopics.txt",
> "w+");
> $line = fgetss ($FileStream, 255);
> print ("number is: ".$line." <br> ");
>
> fclose($FileStream);
>
> always returns nothing
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>