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


相关文档:

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页面——Hello,World!

原文链接:http://www.phpdo.net/index.php/2010/01/26/1-2/
所有编程语言的开始:Hello,world!页面。
首先使用html编写一个简单的页面。代码如下:
<html>
<head>
<title>Hello, world</title>
</head>
<body>
<H1><p align=center>Hello, world</p></H1 ......

简介两款PHP开发的开源的在线办公软件

    诸如 Google Doc 等Web应用,允许通过互联网共享信息进行协同工作,给我们带来了全新的日常办公体验。随着大量的桌面应用被移植到 Web 环境,无论是纯粹的 HTML+CSS+JS 或者 RIA 都将更受追捧。
    以下是两款开放源代码的 Web 办公软件:
    1. OpenGoo
 &nbs ......

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 ......

分享几个php时间相关的函数

function FormatShowTime($nTotalSec)
{
//echo "total sec:" . $nTotalSec . '<br>';

$strTime = "";
//day
if ($nTotalSec > 3600 * 24)
{
$nDay = (int)($nTotalSec / (3600 * 24));
//$nDay > 0 ? $nDay : 1;
$strTime = $nDay;
$strTime .= '天';
//echo "nDay: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号