.htaccess
ErrorDocument 404 /404.php
RewriteEngine on
RewriteRule ^index/(.*)/?$ index.php?page=$1 [L,QSA]
page.php
$num = 15;
$name_file_php = 'index/';
$page = intval($_GET['page']);
if ($page==0) $page=1;
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
$result = $mysqli->query($MYSQL);
$mysqli->close();
if(mysqli_num_rows($result)>0){
$count=mysqli_fetch_row($result);
}
$posts = $count[0];
$total = intval(($posts - 1) / $num) + 1;
$page = intval($page);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;
if ($page != 1) $pervpage = '<a href="'.$name_file_php.'1">«</a>
<a href="'.$name_file_php.''. ($page - 1).'">«/a> ';
if ($page != $total) $nextpage = ' <a href="'.$name_file_php.''. ($page + 1).'"»</a>
<a href="'.$name_file_php.''.$total.'"»></a> ';
if($page - 2 > 0) $page2left = ' <a href="'.$name_file_php.''. ($page - 2) .'">'. ($page - 2) .'</a> ';
if($page - 1 > 0) $page1left = '<a href="'.$name_file_php.''. ($page - 1) .'">'. ($page - 1) .'</a> ';
if($page + 2 <= $total) $page2right = ' <a href="'.$name_file_php.''. ($page + 2).'">'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' <a href="'.$name_file_php.''. ($page + 1).'">'. ($page + 1) .'</a>';
if ($total>1) echo '<div class="navigation">'
.$pervpage.$page2left.$page1left.'<span>'.$page.'</span>'.$page1right.$page2right
.$nextpage.'</div>';
Возможно ли это из-за Open-server версии 5.2.3?