PHP头条
热点:

空模板与空模块在thinkphp中的使用


一、空模块和空操作

1、空操作

  1. function _empty($name){ 
  2.             $this-]show("$name 不存在 [a href='__APP__/Index/index']返回首页[/a]"); 

2.空模块

  1. class EmptyAction extends Action{ 
  2.         function index(){ 
  3.             $city=M('City'); 
  4.             $arr=$city-]select(); 
  5.             $this-]assign('list',$arr); 
  6.             $name=MODULE_NAME;//获得当前地址栏的模块名 
  7.             $this-]display("City:$name");//引用对应的模块 
  8.         } 

www.phpzy.comtrue/phpkj/614.htmlTechArticle空模板与空模块在thinkphp中的使用 一、空模块和空操作 1、空操作 function _empty( $name ){ $this -]show( "$name不存在[ahref=__APP__/Index/index]返回首页[/a]" ); } 2.空模块 class EmptyAction extends Action{ fu...

相关文章

相关频道:

PHP之友评论

今天推荐