易截截图软件、单文件、免安装、纯绿色、仅160KB

php分页TEST,自己写一下

<?
include 'conn.php';
$_pagenob=10; //每页规定的信息数目
//获取当前页
if(isset($_GET["page"]))
{
$_page = intval( $_GET['page'] );
}
else
{
$_page=1;
}
//查询数据总数
$_query="select count(*) as acount from news";
$_result=mysql_query($_query);
$_row=mysql_fetch_row($_result);
$_acout=$_row("acount");
if($_acount)
{
if($_acount<$_pagenob)
{
$_pagecount=1;//当总数小于规定每页数量时 分页总数$_pagecount=1
}
if($_acount%$pagenob) //当取余时 当前加1
{
$_pagecount=int($_acount%$_pagenob)+1;
}
else
{
$_pagecount=$acount/$_pagenob;
}
else
{
$_pagecount=0;
}
//下面略
}
?>


相关文档:

php 创建和删除文件夹

//创建文件夹的方法
//$path 为文件夹参数,如 (c:/program files/makedir)
 function createFolders($path) {
    if (!file_exists($path)) {
      $this->createFolders(dirname($path));
      mkdir($path, 0777);
  &n ......

PHP Security for Deployers

PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......

关于php里的include

 在以前的做的例子中遇到过重复的加载的错误 额 那个是通过include_once()来解决 或者不让他重复加载把重复的include()去掉一个或多个,最终只剩下一个这样问题就解决了,但今天遇到的问题就棘手了 说是找不到文件。
     事情是这样的 ,今天在文件夹里再新建了一个文件夹,然后以前includ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号