Re: Can php read and than print file like it is
| From: | Jan Grafström | Date: | Mon, 02 Apr 2001 16:37:16 +0000 |
| Subject: | Re: Can php read and than print file like it is | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46640@lists.php.net to get a copy of this message | ||
Thank You Steve!
Here is my php
----
<?
$fillista = "fillista.xml";
$fp = @fopen($fillista,r);
$count = fgets($fp,filesize($fillista));
fclose($fp);
print "fillista=".$count;
?>
------
Regards
Jan
Steve Werby wrote:
> "Jan Grafström" <jan@lillemanshus.com> wrote:
> > I have a file with text on 17 rows and when I let php read it ,get
> > filezise and than print I only get the first row.
> > I want all rows exatly like it is in the file, is it possible?
> > My file:
> > <html>
> > <head>
>
> Yes, it's possible. Post your code so we can see what you've tried. I
> suggest using fopen() and fgets() to accomplish what you want. The first
> example in the manual at
> http://www.php.net/manual/en/function.fgets.php
> does exactly what you want.
>
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net