core/library/think/agent/driver/BhvhomeVF.php

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace think\agent\driver;

/**
 * 系统行为扩展:
 */
class BhvhomeVF {
    protected static $actionName;
    protected static $controllerName;
    protected static $moduleName;
    protected static $method;

    /**
     * 构造方法
     * @param Request $request Request对象
     * @access public
     */
    public function __construct()
    {

    }

    // 行为扩展的执行入口必须是run
    public function run(&$params){
        self::$actionName = request()->action();
        self::$controllerName = request()->controller();
        self::$moduleName = request()->module();
        self::$method = request()->method();
        $this->_initialize($params);
    }

    private function _initialize(&$params) {
        $this->agentcode($params);
    }

    /**
     * @access public
     */
    private function agentcode(&$params)
    {
        $agentcode = config('tpcache.php_agentcode');
        if (1 == $agentcode) {
            $php_eyou_blacklist = tpCache('php.php_eyou_blacklist');
            if (!empty($php_eyou_blacklist)) {
                $web_basehost = request()->host(true);
                if (false !== filter_var($web_basehost, FILTER_VALIDATE_IP) || file_exists('./data/conf/multidomain.txt')) {
                    $web_basehost = tpCache('web.web_basehost');
                }
                $web_basehost = preg_replace('/^(([^\:]+):)?(\/\/)?([^\/\:]*)(.*)$/i', '${4}', $web_basehost);
                $vaules = array(
                    'client_domain' => urldecode($web_basehost),
                    'agentcode' => 1,
                    'root_dir'  => ROOT_DIR,
                );
                $service_ey = config('service_ey');
                $url = base64_decode($service_ey).'/index.php?m=api&c=Service&a=get_authortoken&'.http_build_query($vaules);
                $response = httpRequest($url);
                $data = json_decode($response,true);
                if (!empty($data['errcode']) && $data['errcode'] == 10002) {
后面还有 30 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。