在次简化 et 的程序设计

| |
[不指定 2008/06/27 16:16 | by Else ]
<?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");
?>

上在的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

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>



作者:Else 's Blog
地址:http://www.aixq.com/post/1089/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 中查看更多“在次简化 et 的程序设计”相关内容
  • 现在 工作 学习 | 评论(0) | 引用(0) | 阅读(414)
    发表评论
    表情
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]