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

PHP分页

分页类    
   
  /**********  
  |   +---------------------------------------------------  
  |   CLASS   NAME:   PageBar  
  |   +---------------------------------------------------  
  |   Author:   Arvan   [E-mail:Arvan@5n9.com   QQ:8817776]  
  |   Create   date:   2003-7-17  
  |   Note:  
  |   Do   for   pagination  
  |   +---------------------------------------------------  
  |   Warning:   no...    
  |   +---------------------------------------------------  
  **********/  
   
  class   PageBar  
  {  
  var   $total;    
  var   $onepage;  
  var   $num;    
  var   $pagecount;  
  var   $total_page;  
  var   $offset;    
  var   $linkhead;    
   
  function   PageBar($total,   $onepage,   $form_vars='')  
  {  
  $pagecount   =   $_GET['pagecount'];  
  $this->total   =   $total;  
  $this->onepage   =   $onepage;  
  $this->total_page   =   ceil($total/$onepage);  
   
  if   (empty($pagecount))  
  {  
  $this->pagecount   =   1;  
  $this->offset   =   0;    
  }  
  else  
  {  
  $this->pagecount   =   $pagecount;  
  $this->offset   =   ($pagecount-1)*$onepage;  
  }  
   
  if   (!empty($form_vars))  
  {  
   


相关文档:

apache and php common tips and problems

When I deploy php application on apache, some problem come out, and solved. Here's the tips and problems solved.
0.How could I deploy an apache server armed with php, mysql, perl, and phpMyAdmin on the fly?
You need a package bundled with all these tools,  xampp shall meet you needs, you can ......

php smarty基本使用

1.基本类
//smarty_config.php
<?php
define('TEMPLATE_DIR','templates/');
define('COMPILE_DIR','templates_c/');
define('CONFIG_DIR','configs/');
define('CACHE_DIR','cache/');
?>
//View.class.php
<?php
//配置文件
require_once 'configs/smart_config.php';
//Smarty类
require('smarty/ ......

PHP学习笔记1

1,Notice: Undefined variable解决办法
PHP默认配置会报这个错误,我的PHP版本是5.2.9-1,存在这个问题:
Notice: Undefined variable
这就是将警告在页面上打印出来,虽然这是有利于暴露问题,但实现使用中会存在很多问题。
需要设置显示错误级别,来解决问题。
网络上的通用解决办法是修改php.ini的配置:
解决方法 ......

PHP系统学习概要(转帖)个人认为很值得一看!

说明:
1、本文档是为初学PHP的朋友而制作的。
2、看了本文档学会PHP的朋友,请反馈你对本文档的意见或建议(发邮件到kuaiyigang@163.com或在QQ群4798654中提出),以帮助更多的初学者。
1、php语言的概述及开发环境的配置(1天)
a、php发展及应用介绍(了解)
b、php及相关软件在类linux和windows的具体安装步骤 (初 ......

PHP的语言构成与工作原理

原文链接:http://www.phpdo.net/index.php/2010/01/27/1-3/
昨天我们实现了PHP的第一个页面hello,world!
 PHP的语言构成与工作原理是什么呢?
 宏观地将:一个完整的PHP程序是由主程序和函数构成。PHP程序的执行从主程序开始,调用其他函数后返回主程序并结束。
 在PHP的主程序和函数中,PHP函数的基 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号