problem in reading php file?

  • Thread starter Thread starter ishvarya.s
  • Start date Start date
I

ishvarya.s

Guest
hi all..clarify my code error..
in.php
<?php
$name=$_POST[nam];
echo $name;
?>

fileread.php
<?php
$fh=fopen("in.php","r");
while(!feof($fh))
{
$line=fgets($fh,100);
echo $line;
}
fclose($fh);
?>

Problem here is echo $line in fileread.php is not displaying any content if i give any text file as input it reads and displays the content.fileread.php doesn't read firstline of in.php i.e.,<?php

pl help me to run the above code successfully..

thanks in advance
 
Back
Top