开启了mysqli扩展的小伙伴在使用<a href=" .$_SERVER['PHP_SELF'].'?p='.($page-1). ">上一页</a>会报错,说传递的不是一个结果集,我是这么解决的,报错的小伙伴可以借鉴 $p1=$page-1;
$p2=$page+1;
$page_banner = "<a href='".$_SERVER['PHP_SELF']."?p=$p1'>上一页</a>";
$page_banner .= "<a href='".$_SERVER['PHP_SELF']."?p=$p2'>下一页</a>";
echo $page_banner;
$p2=$page+1;
$page_banner = "<a href='".$_SERVER['PHP_SELF']."?p=$p1'>上一页</a>";
$page_banner .= "<a href='".$_SERVER['PHP_SELF']."?p=$p2'>下一页</a>";
echo $page_banner;
2016-04-27
( ! ) Parse error: syntax error, unexpected '",10"' (T_CONSTANT_ENCAPSED_STRING) in D:\wamp\www\mypage.php on line 15
2016-04-15