а чё там сложного?
$count_strings = 20;
$page = isset($_GET['p']) ? (int)$_GET['p'] : 1;
$file = file_exists('text.txt') ? file('text.txt') : array();
$count_all_pages = ceil(count($file) == 0 ? 1 : count($file)/$count_strings);
foreach($file as $k=>$v){
if($page == 1)
echo $v.'<br />';
elseif($k > $page*$count_strings - $count_strings && $page != 1)
echo $v.'<br />';
if($k == $page*$count_strings)
break;
}
for($i=1; $i<$count_all_pages; $i++){
echo $i == $page ? '<b>'.$i.'</b>': '<a href="/?p='.$i.'">['.$i.']</a>';
}
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker