'ACTION_BIND_CLASS' => True,
D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\OuterMok\Conf\config.php
<?php return array( 'ACTION_BIND_CLASS' => True, );
D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\OuterMok\Controller\Index\index.class.php
<?php namespace OuterMok\Controller\Index; use Think\Controller; class index extends Controller{ //http://localhost/thinkphp323/index.php/OuterMok/Index/index public function run(){ if (IS_POST){ echo '<br>is post<br>'; }else{ echo '<br>not post<br>'; } echo '执行Index控制器的index操作'; $this->assign('msg','Hello~~~执行Index控制器的index操作!!'); $this->display(); } public function _before_run(){ echo 'before_'.ACTION_NAME; } public function _after_run(){ echo 'after_'.ACTION_NAME; } }
D:\LearnWebDevelop\php\thinkphp_3.2.3_full\Application\OuterMok\View\Index\index.html
<layout name="Layout/newlayout" /> <body> {$msg} <hr> <form method="post" action=""> <input type="submit"> </form> </body>

浙公网安备 33010602011771号