application/common.php

(开头部分) 57KB

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

<?php

// 应用公共函数文件
use app\common\service\Config as ConfigModel;
use app\common\api\WechatApi as WechatApi;
use app\common\service\Addons as AddonsService;
use think\Loader;
use think\Config;
use think\facade\Hook;
use think\Request;
use think\response\Redirect;
use think\Route;
use think\Session;
use think\facade\Env;
use app\common\service\QrcodeServer;
use app\common\service\Excelhandle;
use think\Validate;
use think\Db;

// 错误级别
// error_reporting(E_ERROR | E_WARNING | E_PARSE);
// 去除警告错误
error_reporting(E_ALL ^ E_NOTICE);
ini_set("error_reporting","E_ALL & ~E_NOTICE");

/**
 * [获取系统配置]
 * @param string $name [all-全部(三维数组) 配置名称-单个(.可获得配置数组的键值)]
 * @param  [string] $scope [范围 all-全部(三级) sys-系统配置(二级) wx-微信配置(二级) pay-支付配置(二级) run-运行时配置(二级) env-系统环境配置(一级) auth-授权配置(一级) ]
 * @return 返回配置信息数组
 */
if (!function_exists('com_get_config')) {
    function com_get_config($name , $scope) {
       $ConfigModel = new ConfigModel();
       $result = $ConfigModel->getConfig($name, $scope);
       return $result;
    }
}

// 获取jsapi配置
if (!function_exists('com_get_wxjs_config')) {
    function com_get_wxjs_config($url = '') {
       $WechatApi = new WechatApi();
       $result = $WechatApi->getSignPackage($url);
       return $result;
    }
}

// 获取插件类
if (!function_exists('com_addons')) {
    function com_addons($name) {
        static $_addons = [];
        if(empty($name)) return false;
        return isset($_addons[$name]) ? $_addons[$name] : (new AddonsService())->loadService($name);

    }
}

/**
 * [获取常量值]
后面还有 1771 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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