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

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 新版本的鉤子沒有生效路徑跟舊的好像不一樣有人知道怎么處理嗎新 2 0
POSCMS版本:3.5.4 #php

新版本的鉤子沒有生效,路徑跟舊的好像不一樣,有人知道怎么處理嗎?

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

這是config/my_hooks.php代碼

<?php

/**
 * 我的鉤子定義配置
 */
defined('BASEPATH') OR exit('No direct script access allowed');

/*
$hook['鉤子名稱'][] = array(
    'class' => '類名稱',
    'function' => '方法名稱',
    'filename' => '鉤子文件.php',
    'filepath' => 'hooks',
);
 */
/**
 * 文章發布之后
 */
$hook['content_add_after'][] = array(
    'class' => 'news_hooks',
    'function' => 'news_after_go',
    'filename' => 'news_hooks.php',
    'filepath' => 'hooks',
);

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

<?php
/**
 * Created by PhpStorm.
 * User: chunjie
 * Date: 14-6-23
 * Time: 17:11
 */
class news_hooks {
    public $ci;
    /**
     * 構造函數
     */
    function __construct() {
        $this->ci = &get_instance();
    }
    function news_after_go($data) {
       $dir = "kefu53";
		if(!is_dir($dir)){
			$res=mkdir(iconv("UTF-8", "GBK", $dir),0777,true); 
		}

		$insertinfo = file_put_contents($dir."/info.txt",date("y-m-d H:i:s",time()).PHP_EOL, FILE_APPEND);
    }
	/* function news_before_go($data){
		if($data){
			$this->ci->member_msg(SITE_ID);
		}
	} */
}

然后我看 到/diy/poscms/config/這里目錄下也有hooks.php

后面試著放在那邊也是不行的。有人知道這個鉤子現在是怎么樣的嗎

解決方案