'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>

 

posted @ 2017-12-18 11:19  sky20080101  阅读(255)  评论(0)    收藏  举报