PHPro.org: Read Line From File (stream_get_line)

Courtesy PHPDeveloper.org  Thu, 04/23/2009 - 08:36

The PHPro.org website has a quick new tutorial about a method (using streams) to get the information from a certain line of a file.

Reading files in PHP can be a tricky business if not handled correctly. Most often when confronted with reading a line from, the nearest tool to hand is the file() function.

The problem with using the file() function is that it reads the whole file into an array, and thus, into memory [...]...


 

More related items

Komunitasweb.com: Showing the weather with PHP and...
On the Komunitasweb.com blog there's a recent post walking you through the steps to add the Google weather content to your site, complete with icons. If you need to show weather in your...

Reading Multiple Files with Bash
Linux Journal: "Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script...

Reading Multiple Files with Bash
Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script if the file names...

HP W1907 19-inch Widescreen Flat Panel LCD Monitor
With a resolution of 1440 x 900 and wide workspace, you can watch videos, edit photos, surf the net or play games with the HP W1907. Its wide aspect ratio and fast response time bring work...

NZXT ACC-NT-CRYO-S 120MM Aluminum Notebook Cooler...
CRYO LX SILVER - ALUMINUM COOLER FOR POWER NOTEBOOKS


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com