Sun Oct 26, 2008 9:20 pm
<html>
<head>
<title>Opening and reading a file line by line</title>
</head>
<body>
<?php
$filename = "test.txt";
$fp = fopen( $filename, "r" ) or die("Couldn't open $filename");
while ( ! feof( $fp ) ) {
$line = fgets( $fp, 1024 );
print "$line<br>";
}
?>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.