Good I have the code portion to read a file and show it
$file = fopen("../assets/libros/el_libro_de_la_sabiduria/cap_01.htm", "r") or exit("Unable to open file!");
$getline = '';
while(!feof($file))
{
$getline .= fgets($file). "<br />";
}
$getfile = utf8_encode($getline);
echo '<pre>';
echo $getfile;
echo '</pre>';
fclose($file);
This code takes up the entire file. What I would like to know is. How can I read the file in parts?
That is, I can divide the file by pages (Page 1, Page 2, Page 3, etc.), and I can use links to access them.
Thank you very much for the help you can give me in advance.
The data is sent and received through ajax.
EDIT: Basically, divide the file and create pages to go through (Page by page) until the file is finished.