ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 鉤子路徑還是/dayrui/hooks/ 這個嗎,為什么我的執行文件無效啊 5 0
POSCMS版本:3.5.0

新版鉤子路徑還是/dayrui/hooks/ 這個嗎,為什么我的執行文件無效啊,,

這是config/my_hooks.php代碼

$hook['content_add_before'][] = array(
    'class' => 'hc',
    'function' => 'add_content_afater',
    'filename' => 'add_content.php',
    'filepath' => 'hooks',
);



$hook['content_delete'][] = array(
    'class' => 'hc',
    'function' => 'content_delete',
    'filename' => 'add_content.php',
    'filepath' => 'hooks',
);


/這是/diy/dayrui/hooks/add_content.php文件,鉤子執行代碼

<?php


class hc {

    public $ci;

    /**
     * 構造函數
     */
    function __construct() {
        $this->ci = &get_instance();
    }

    // 發布時同步到匯總表
    function add_content_afater($data) {

      $param=array(
        'catid'=>$data[0]['catid'],
        'cid'=>$data[0]['id'],
        'module'=>APP_DIR,
        'inputtime'=>SYS_TIME
      );
      $this->ci->db->insert('dr_content_all',$param);


    }
    function content_delete($data){

      $param=array(
        'cid'=>$data['id'],
        'module'=>APP_DIR
      );
      $this->ci->db->delete('dr_content_all',$param);
      // var_dump($data);


    }


}


為啥沒效果啊,不執行


解決方案