Hi friends,
I need to do:
function getCurrentLineNumber( &$handle ) {
##Gets the current position of the internal pointer of a handle
}
function goTo( &$handle, $int_line_number = 0 ) {
##Set the position of the internal pointer of a handle to $int_line_number
}
Result:
$handle = fopen( 'test.txt', 'r' );
goTo( &$handle, 15 );
echo fgets( $handle, 4096 ); ##Print the 15th line
echo fgets( $handle, 4096 ); ##Print the 16th line
echo fgets( $handle, 4096 ); ##Print the 17th line
echo getCurrentLineNumber( $handle ); ##Print 18