Hi! Why fread() function do not read first two lines in a file? I have a chrates.php file :
<html> <head> <title>Title here!</title> </head> <body> <? if (isset($save)) { // get contents of a file into a string $filename = "/var/www/html/data/rates.php"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); echo $contents; // !!! here i see all contents of rates.php without first two lines fclose ($fd); } ?> <br> <form method="post" action="<?=$php_self?>"> <input type="text" name="text" > <input type="submit" name="save" value="save"> </form> </body> </html> PS.rates.php is: <?php $currency_rates = array( 'ADF' => '6.5596', 'ADP' => '183.180', 'AED' => '3.6725', 'AFA' => '4750.00', 'ALL' => '143.840', 'ANG' => '1.7800', 'AON' => '5.8956', ..... 'ZAR' => '7.8350', 'ZMK' => '2780.00', 'ZWD' => '550.000', 'DUMMY', '' ); ?> tx