風之紫色  BLOG

FZ php framework ----- 更新日志

FZ框架文档2011-11-07 13:21
更新日志:

V1.1 ----- 新增了自定义路由功能

代码如下
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <routers>
  3.     <new>
  4.         <router regx="/new/([a-z].*)">
  5.             <controller>new</controller>
  6.             <action>index</action>
  7.             <params>1</params>
  8.         </router>
  9.     </new>
  10.     <esf>
  11.         <router regx="/esf/([a-z].*)">
  12.             <controller>esf</controller>
  13.             <action>index</action>
  14.             <params>1</params>
  15.         </router>
  16.     </esf>
  17.     <rent>
  18.         <router regx="/rent/([a-z].*)">
  19.             <controller>rent</controller>
  20.             <action>index</action>
  21.             <params>1</params>
  22.         </router>
  23.     </rent>
  24.     <broker>
  25.         <router regx="/broker/([a-z].*)">
  26.             <controller>broker</controller>
  27.             <action>index</action>
  28.             <params>1</params>
  29.         </router>
  30.     </broker>
  31. </routers>

V1.2 ----- 新增自定义载入js功能

代码如下
  1.      /**
  2.      *
  3.      * 自定义增加js ,css
  4.      * @param unknown_type $type 类型
  5.      * @param unknown_type $params  参数 array(url,init); url --- 文件地址, init --- 初始化函数
  6.      * @param unknown_type $priority 优先级,默认最高优先级,数值越大,优先级越低
  7.      */
  8.     public function append($type,$params,$priority = 0)

只需在视图中使用以下代码,就可以实现js按需加载了
代码如下
  1. <?php $this->append('js',array('/public/js/source/user/user.core.js','user.login.init()'),100)?>

随便说说

还可以输200
*友情提个醒:发言上限:每个会话5次(空间有限,你懂的),剩余5
Copyright © 風之紫色, All Rights Reserved.Theme by 風之紫色.Style as Facebook.
Time:0.03343s,Mem1.286944M
FZ 1.0   Author : 風之紫色