xiumei

xiumei

这家伙有点懒,还没写个性签名!

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

个人信息

  • 回复了 的回复

    在controller的Action中写的绑定事件,之后事件不会执行,

    请问题主的controller继承的是哪个呢?我继承的是yii\web\Controller。
    /**

     * @param string $id the ID of this controller.
     * @param Module $module the module that this controller belongs to.
     * @param array $config name-value pairs that will be used to initialize the object properties.
     */
    public function __construct($id, $module, $config = [])
    {
        $this->id = $id;
        $this->module = $module;
        parent::__construct($config);
    }
    

    难道必须要把on写到构造函数里?没道理啊

  • 在controller的Action中写的绑定事件,之后事件不会执行,

    请问题主的controller继承的是哪个呢?我继承的是yii\web\Controller。
    /**

     * @param string $id the ID of this controller.
     * @param Module $module the module that this controller belongs to.
     * @param array $config name-value pairs that will be used to initialize the object properties.
     */
    public function __construct($id, $module, $config = [])
    {
        $this->id = $id;
        $this->module = $module;
        parent::__construct($config);
    }
    
实习生 等级规则
10/20
资料完整度
30/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

2

Ta的访客

0