php无限分类的类
<?php
/**
by lenush;
*/
class Tree
{
var $data = array();
var $child = array(-1=>array());
var $layer = array(-1=>-1);
var $parent = array();
function Tree ($value)
{
$this->setNode(0, -1, $value);
} // end func
function setNode ($id, $parent, $value)
{
$parent = $parent?$parent:0;
$this->data[$id] = $value;
$this->child[$id] = array();
$this->child[$parent][] = $id;
$this->parent[$id] = $parent;
if (!isset($this->layer[$parent]))
{
$this->layer[$id] = 0;
}
else
{
$this->layer[$id] = $this->layer[$parent] + 1;
}
} // end func
function getList (&$tree, $root= 0)
{
foreach ($this->child[$root] as $key=>$id)
{
 
相关文档:
<?php
function genpage(&$sql,$page_size=10)
{
global $pages,$sums,$eachpage,$page; //总页数,总记录,每页数,当前页
$page = $_GET["page"];
if($page ==0)$page =1;
$eachpage = $page_s ......
打开 httpd.conf 文件 加入以下配置
以php模块配置apache2.2.x
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL by hooyes
PHPIniDir "D:/php-5.2.6-Win32/"
LoadFile D:/php-5.2.6-Win32/php5ts.dll
LoadFile D:/php-5.2.6-Win32/li ......
毋庸置疑,PHP是一种非常棒的动态网页制作语言,他和C的极高相似性,使得它的语法学起来
很容易,他有很多类似C语言库函数的东西,还有像日期,字符串和时间函数等,这使得它很容
易开发相当复杂的应用程序。
当PHP应用到关键web站点上,如何保证质量将会变得很关键。然而,PHP并不是一 ......
在Flex中有2个HTTPService类,它们的完整继承路径分别是mx.rpc.http和mx.rpc.http.mxml,可以看出mx.rpc.http.mxml是mx.rpc.http的子类。mx.rpc.http.mxml中的httpService主要是为了MXML标签中使用HTTPService而设的。mx.rpc.http是在使用as脚本进行操作时使用。当调用 HTTPService 对象的 send() 方法时,将发出对指定 URL ......
PHP中的stristr(),strstr(),strpos()速度比较
测速代码:
<?php
function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
......