application/route.php

(开头部分) 27KB

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

<?php
/**
 * 易优CMS
 * ============================================================================
 * 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
 * 网站地址: http://www.eyoucms.com
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
 * ============================================================================
 * Author: 小虎哥 <1105415366@qq.com>
 * Date: 2018-4-3
 */

$home_rewrite = [];
$route = [
    '__pattern__' => [
        'tid' => '[\-\w]+',
        'dirname' => '[\-\w]+',
        'aid' => '[\-\w]+',
    ],
    '__alias__' => [],
    '__domain__' => [],
];
$__pattern__ = $route['__pattern__'];

$globalTpCache = tpCache('global');
config('tpcache', $globalTpCache);

$goto = input('param.goto/s');
$goto = trim($goto, '/');
// 会员中心模板风格
$web_users_tpl_theme = !empty($globalTpCache['web_users_tpl_theme']) ? $globalTpCache['web_users_tpl_theme'] : config('ey_config.web_users_tpl_theme');
config('ey_config.web_users_tpl_theme', $web_users_tpl_theme);

// 前台模板风格
$web_tpl_theme = !empty($globalTpCache['web_tpl_theme']) ? $globalTpCache['web_tpl_theme'] : config('ey_config.web_tpl_theme');
if (empty($web_tpl_theme)) {
    if (file_exists(ROOT_PATH.'template/default')) {
        $web_tpl_theme = 'default';
    } else {
        $web_tpl_theme = '';
    }
} else {
    if ('default' == $web_tpl_theme && !file_exists(ROOT_PATH.'template/default')) {
        $web_tpl_theme = '';
    }
}
config('ey_config.web_tpl_theme', $web_tpl_theme);
!empty($web_tpl_theme) && $web_tpl_theme .= '/';

/*辨识是否代码适配,还是PC与移动的分离模板*/
$num = 0;
$response_type = 0; // 默认是代码适配
$tpldirList = ["template/{$web_tpl_theme}pc/index.htm","template/{$web_tpl_theme}mobile/index.htm"];
foreach ($tpldirList as $key => $val) {
    if (file_exists($val)) {
        $num++;
        if ($num >= 2) {
            $response_type = 1; // PC与移动端分离
        }
后面还有 590 行代码,购买后查看完整代码

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

AI 解读 AI

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

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