ThinkPHP 3.1.2 |
本节课大纲: |
一、空模块和空操作 |
1、空操作 |
function _empty( $name ){ |
$this ->show( "$name 不存在 <a href='/Index/index'>返回首页</a>" ); |
} |
2.空模块 |
class EmptyAction extends Action{ |
function index(){ |
$city =M( 'City' ); |
$arr = $city ->select(); |
$this ->assign( 'list' , $arr ); |
$name =MODULE_NAME; |
$this ->display( "City:$name" ); |
} |
} |
二、前置操作和后置操作 |