<?php
require_once("class/cuku.php");
$ck = new Cuku();
$time_start = $ck->getmicrotime();
$db = $ck->my($db_server,$db_username,$db_password,$db_name);
$tl = $ck->tp($mbcon[template]);
#以上是mysql数据库文件的设置
//include("public.php");
$list=$ck->et_cat("ck_test"); //tablename ck_test
$time = $ck->getmicrotime()-$time_start;
$ck->mk("test");
?>
require_once("class/cuku.php");
$ck = new Cuku();
$time_start = $ck->getmicrotime();
$db = $ck->my($db_server,$db_username,$db_password,$db_name);
$tl = $ck->tp($mbcon[template]);
#以上是mysql数据库文件的设置
//include("public.php");
$list=$ck->et_cat("ck_test"); //tablename ck_test
$time = $ck->getmicrotime()-$time_start;
$ck->mk("test");
?>
上在的time应该可以放到class cuku 里的属性中
之前要模板中无法做到无限分类,现在的话,通过$ck->et_cat("table")来实现达到et的无限分类的效果!
无限分类,只是为了管理方便!不知道是不是这样理解,至少,代码都少了,
输出的结果:
引用
|-class1
|----one 1
|-------small one 7
|-------smail two 7
|----two 1
|-class2
|----two 2
|----one 2
|-class3
|----one 3
|----two 3
|-class4
|----one 4
|----two 4
|-class5
|-class6
time0.00342679023743
|----one 1
|-------small one 7
|-------smail two 7
|----two 1
|-class2
|----two 2
|----one 2
|-class3
|----one 3
|----two 3
|-class4
|----one 4
|----two 4
|-class5
|-class6
time0.00342679023743
html页
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!--$list as $lst-->
<div>{lst[catname]}</div>
<!--end-->
time{time}
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!--$list as $lst-->
<div>{lst[catname]}</div>
<!--end-->
time{time}
</body>
</html>
作者:Else 's Blog
地址:http://www.aixq.com/post/1089/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
中查看更多“在次简化 et 的程序设计”相关内容
中查看更多“在次简化 et 的程序设计”相关内容
中查看更多“在次简化 et 的程序设计”相关内容
中查看更多“在次简化 et 的程序设计”相关内容
中查看更多“在次简化 et 的程序设计”相关内容
中查看更多“在次简化 et 的程序设计”相关内容相关日志
把php优化成html的.htaccess的方法
修改原来的类,达到可以执行存储过程
asp導出excel的文件,附加php的方法
php列出目录中的所有文件
10 件(也许)你不了解 PHP 的事情
把php优化成html的.htaccess的方法
修改原来的类,达到可以执行存储过程
asp導出excel的文件,附加php的方法
php列出目录中的所有文件
10 件(也许)你不了解 PHP 的事情
NetBeans IDE Early Access for PHP的问题
注册(创办)公司的手续过程


2008/06/27 16:16 | by 
