colly_wyx
2017-08-11 2c88c99afe3b6f68d9f74d68f7e02a62e2f2c32d
修改默认路口
2 files modified
18 ■■■■■ changed files
application/controllers/Index.php 10 ●●●● patch | view | raw | blame | history
application/modules/Public/controllers/User.php 8 ●●●● patch | view | raw | blame | history
application/controllers/Index.php
@@ -1,14 +1,6 @@
<?php
    class IndexController extends Yaf_Controller_Abstract{
        public function indexAction(){
            //$this->_view->word = "hello world";
            $message = 'hello';
$example = function ($data) use ($message){
  return "{$data},{$message}";
};
echo $example('world');
            //or
            //$this->getView()->word = "hello world";
            $this->redirect('/user_login.html');
        }
    }
application/modules/Public/controllers/User.php
@@ -28,7 +28,13 @@
                else{
                    exit($this->showSuccess('登录成功', true));
                }
            }
            }
            else{
                $session = Yaf_Session::getInstance();
                if(isset($session['user'])){
                    $this->redirect('/admin/index/index');
                }
            }
        }
        /**