wkf928592 2012-06-27 17:31:23 9225次浏览 25条回复 0 0 0

由于源文件较大,这里只能上传2M,我就上传到我自己的博客里了,有想看的去看看吧。包括源文件的数据库

部分截图:

[attach]787[/attach][attach]792[/attach][attach]790[/attach][attach]794[/attach][attach]793[/attach][attach]789[/attach][attach]791[/attach][attach]788[/attach][attach]795[/attach]

http://www.wukunfan.com/index.php/php-yii-class.html需要的点击这里去下载吧~~

  • 回复于 2012-07-10 10:30 举报

    先收藏了吧

  • 回复于 2012-07-10 12:12 举报

    在protected->components->controller里我用以下代码进行了登录控制:

    public function beforeAction(){
        $c =  $this->id;
        $a =  $this->action->id;
    
        if (!Yii::app()->user->isGuest  || $a=='login' || $a=='captcha'){
            return true;
        }else{
            $this->redirect('/news');
        }
    }
    

    在未登录的情况下是所有页面都进不去的,直接跳到登录页。至于你说的class这个控制器可以直接进入,不可能吧?我这里不登录是进不去的 啊。

    另外,site那个控制器中actionContact是无用的,我忘记删去。

  • 回复于 2012-08-04 00:39 举报

    直接解压貌似有问题,组建下的controller里beforeAction会报错:
    Declaration of Controller::beforeAction() should be compatible with CController::beforeAction($action)

    删除此方法就可以了?何解?

  • 回复于 2012-08-04 01:17 举报

    呵呵 过段时间我也分享下我写的企业站给大家! 哈哈

  • 回复于 2012-11-15 12:06 举报

    这里的资源下不了,你那里有备份么?

您需要登录后才可以回复。登录 | 立即注册