flyok666

flyok666

yii fans

  • 财富值25
  • 威望值0
  • 总积分25

个人信息

  • 一样的 看源代码

    /**
    * Returns the relative URL for the application.
    * This is a shortcut method to {@link CHttpRequest::getBaseUrl()}.
    * @param boolean $absolute whether to return an absolute URL. Defaults to false, meaning returning a relative one.
    * @return string the relative URL for the application
    * @see CHttpRequest::getBaseUrl()
    */
    public function getBaseUrl($absolute=false)
    {
        return $this->getRequest()->getBaseUrl($absolute);
    }
    
  • 熟悉OOP后 你就能体会区别了

  • public function save()
    {
        $main=new Main();
        $main->findByPk(3);
        $main->value=$cssClass;
        $main->save();
    }
    

    这里改成

    public function save()
    {
        $main=new Main();
        $main->findByPk(3);
        $main->value=$this->cssClass;
        $main->save();
    }
    
  • 从 Yii 权威指南 开始入门吧:)

  • 'options' => array(
      'changeYear' => 'true',
    

    加上这个就行了

试用期 等级规则
25/50
资料完整度
40/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

0

Ta的访客

2