hi sir i m working with fseek() and ftell().
i don't know what is the problem.i have just moved the position indicator 4 steps ahead and write the data on file. the code is correctly writing in the file but it is not displaying when i try to display it.
here the code is..
reading the data from file.
<?php
if(! $fp=fopen("abc.txt", "w"))
die("could not find the required file");
else
{
fseek($fp,4);
fwrite($fp,"welcome to php programming");
}
$file=fopen("abc.txt", "r");
$fi=ftell($file);
fseek($file,$fi);
echo fread($file,20);
?>
it does not display anything. but data has been written on the file.
please help me. :'(