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))
{
相关文档:
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 ......
原文链接:http://www.phpdo.net/index.php/2010/01/25/29/
学习了一段时间PHP,觉得有点收获。也应该将学过的东西拿出来晒晒了,不然就交回给课本了。
PHP是什么呢?
PHP,是超级文本预处理语言(PHP:Hypertext Preprocessor)的缩写。PHP 是一种 HTML 内嵌式的语言,是一种在服务器端执行的嵌入HTML文档的脚本语言,语 ......
原文链接: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 ......
内容摘要:RSS 聚合最近非常流行,因此至少对 RSS 及其工作方式有所了解是一名 PHP 开发人员的迫切需要。本文介绍了 RSS 基础知识、RSS 众多用途中的一些用途、如何使用 PHP 从数据库创建 RSS 提要,以及如何使用 XML_RSS 模块读取现有 RSS 提要并将其转换为 HTML。
什么?您没听说过 RSS?
RSS 聚合是最常见的 ......
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 ......