![]() |
|
how to read data in filling php - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: PHP (https://sinister.li/Forum-PHP) +--- Thread: how to read data in filling php (/Thread-how-to-read-data-in-filling-php) |
how to read data in filling php - yusibhai - 10-31-2012 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]
?> |