note 120282 added to function.fgets

From: Date: Tue, 06 Dec 2016 17:56:16 +0000
Subject: note 120282 added to function.fgets
Groups: php.notes 
Request: Send a blank email to php-notes+get-208238@lists.php.net to get a copy of this message
One easy sample, how to use "fgets": This sample shows how to read the Information from an .txt file: <?php $z=fopen("protocol.txt","r"); //r = read if($pointer!=false) //Is it possible to open the File?! { //Repeats all Information from protocol.txt while(!feof($pointer)) //the loop runs till the Pointer is at the End of the File { $row = fgets($pointer); // $row reads the Information from the row of the File echo "<p>".$row."</p>"; } fclose($pointer); //File must be closed } else { echo"<p> It was not possible to open the File!</p>"; } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 80.254.150.67 (proxied: 46.5.0.254) ---- Manual Page -- http://php.net/manual/en/function.fgets.php Edit -- https://master.php.net/note/edit/120282 Del: integrated -- https://master.php.net/note/delete/120282/integrated Del: useless -- https://master.php.net/note/delete/120282/useless Del: bad code -- https://master.php.net/note/delete/120282/bad+code Del: spam -- https://master.php.net/note/delete/120282/spam Del: non-english -- https://master.php.net/note/delete/120282/non-english Del: in docs -- https://master.php.net/note/delete/120282/in+docs Del: other reasons-- https://master.php.net/note/delete/120282 Reject -- https://master.php.net/note/reject/120282 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#208238) next »