易截截图软件、单文件、免安装、纯绿色、仅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 json ajax

 互联网的今天,AJAX已经不是什么陌生的词汇了。说起AJAX,可能会立即想起因RSS而兴起的XML。XML的解析,恐怕已经不是什么难题
了,特别是PHP5,大量的XML解析器的涌现,如最轻量级的SimpleXML。不过对于AJAX来说,XML的解析更倾向于前台Javascript
的支持度。我想所有解析过XML的人,都会因树和节点而头大。不可否认,X ......

php中utf 8编码下用正则表达式如何匹配汉字

需要用的php的正规匹配汉字,在网上找了些文章看了以下,看到这个的时候感觉这篇文章写的很真实,忍不住转过来了。
原文地址:http://hi.baidu.com/comdeng/blog/item/f272362e47ce29564ec226c5.html
在javascript中,要判断字符串是中文是很简单的。比如:
var str = "php编程";
if (/^[\u4e00-\u9fa5]+$/.t ......

Smarty 模板 从php分配的变量

index.php:
$smarty = new Smarty;
$smarty->assign('Contacts',
array('555-222-9876',
'zaphod@slartibartfast.com',
array('555-444-3333',
'555-111-1234')));
$smarty->display('index.tpl');
index.tpl:
{$Contacts[0]}<br>
{$Contacts[1]}<br>
{* you can print arrays of arrays ......

Smarty 模板 从php分配的变量 数组

index.php:
$smarty = new Smarty;
$smarty->assign('Contacts',
array('555-222-9876',
'zaphod@slartibartfast.com',
array('555-444-3333',
'555-111-1234')));
$smarty->display('index.tpl');
index.tpl:
{$Contacts[0]}<br>
{$Contacts[1]}<br>
{* you can print arrays of arrays ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号