app/home/controller/Base.php
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 人人站CMS
* ============================================================================
* 版权所有 2015-2030 山东康程信息科技有限公司,并保留所有权利。
* 网站地址: http://www.rrzcms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
*/
namespace app\home\controller;
use app\BaseController;
class Base extends BaseController
{
protected $viewDriver;
protected $env = [
'lang' => '',//语言
'page' => 'index',//当前页面类型
'menu' => [],//当前菜单信息
'isMobile' => false,//是否手机端
'defImg' => '',//站点默认图
];//将作为系统变量输入到模版中
protected function initialize() {
parent::initialize();
$lang = I('param.lang', $this->app->lang->getLangSet());
$this->env['lang'] = $lang;
$this->app->lang->setLangSet($lang);
$this->env['isMobile'] = $this->app->request->isMobile();
$this->env['defImg'] = sysConfig('website.def_img',null,'');
$status = sysConfig('website.status');
$status or exit('<div style="text-align:center; font-size:20px; font-weight:bold; margin:50px 0px;">' . __('网站暂时关闭,维护中……') . '</div>');
$wap_domain = sysConfig('admin.wap_domain');
if ($this->request->isMobile() && $wap_domain) {//手机站独立域名
$wap_domain = trim($wap_domain);
if (preg_match('/^http(s)?\:\/\//i', $wap_domain)) {
$info = parse_url($wap_domain);
if (strpos($this->request->domain(), $info['host']) === false) {
header('Location: ' . $wap_domain);
exit;
}
}
}
/**初始化模板位置**/
$driver = $this->view::engine();
$path = $templatePath = $driver->getConfig('view_path');
$tpl_replace_string = $driver->getConfig('tpl_replace_string');
$type = 'pc';
if ($this->request->isMobile() && is_dir($path . 'mobile')) {
$type = 'mobile';
}
后面还有 115 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。