Difference between revisions of "PHP:Read a Text File"

From Progzoo
Jump to navigation Jump to search
 
Line 1: Line 1:
You can open a text file and read each line.
+
{{topTenTips}}
==Reading lines==
+
<question lang="php" className="Demo" copyFile="haggis.txt">You can open a text file and read each line.<prog><![CDATA[
<question lang="php" className="Demo" copyFile="haggis.txt"><prog><![CDATA[
 
 
<?
 
<?
 
$fh = fopen('haggis.txt','r');
 
$fh = fopen('haggis.txt','r');

Latest revision as of 22:29, 31 December 2007

You can open a text file and read each line.

The text file [../haggis.txt haggis.txt] includes some lines of text.

[Font] [Default] [Show] [Resize] [History] [Profile]