Re: Lines of txt

From: Date: Fri, 28 Sep 2001 04:58:34 +0000
Subject: Re: Lines of txt
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9590@lists.php.net to get a copy of this message
Hi Devon, This is the way I do... but not using fopen: if (is_file($file)) { $fileArray = file($file); foreach($fileArray as $line) { // just do whatever u want to the line... echo("$line"); } } hope it helps~ :) -- regards, chen wei (http://www.cw213.net) =================================== Solutions Developer of Earth9.com =================================== Friday, September 28, 2001, 8:46:26 AM, you wrote: D> Below is my source that sipply opens a file D> <?php D> $fp = fopen ("http://localhost/Install.txt", "r"); D> if ($fp) D> { print"The file exists!"; } D> else D> { print"The file does not exist"; } ?>> D> I Need to be able to a. print the file out b. The file must be printed out D> line by line c. Write each seperate line to a mysql data base in different D> tables. D> Any help would be awsome D> Cheers

« previous php.windows (#9590) next »