how to read data in filling php 10-31-2012, 06:37 AM
#1
Here we will study how to read saved file through php coding.
Code:
<?php
$f=fopen("test.txt"."r"); [color=#800000] // here firstly we open file and "r" is for reading file //[/color]
while(!feop($f)); [color=#800000] // that condition tells that file is present or not //[/color]
{
echo fgetc($f); [color=#800000]// if file foud then by this command we can read data written in that fil // [/color]
or
echo fgets($f);
echo "<hr>";
}
fclose($f); [color=#800000]// close that file after reading //[/color]
?>