.inc php,index.inc.php
!defined('DEBUG') AND exit('Access Denied.');
// hook index_inc_start.php
$sid = sess_start();
// 语言 / Language
$_SERVER['lang'] = $lang = include _include(APP_PATH."lang/$conf[lang]/bbs.php");
// 用户组 / Group
$grouplist = group_list_cache();
// 支持 Token 接口(token 与 session 双重登陆机制,方便 REST 接口设计,也方便 $_SESSION 使用)
// Support Token interface (token and session dual match, to facilitate the design of the REST interface, but also to facilitate the use of $_SESSION)
$uid = intval(_SESSION('uid'));
empty($uid) AND $uid = user_token_get() AND $_SESSION['uid'] = $uid;
$user = user_read($uid);
$gid = empty($user) ? 0 : intval($user['gid']);
$group = isset($grouplist[$gid]) ? $grouplist[$gid] : $grouplist[0];
// 版块 / Forum
$fid = 0;
$forumlist = forum_list_cache();
$forumlist_show = forum_list_access_filter($forumlist, $gid);// 有权限查看的板块 / filter no permission forum
$forumarr = arrlist_key_values($forumlist_show, 'fid', 'name');
// 头部 header.inc.htm
$header = array(
'title'=>$conf['sitename'],
'mobile_title'=>'',
'mobile_link'=>'./',
'keywords'=>'', // 搜索引擎自行分析 keywords, 自己指定没用 / Search engine automatic analysis of key words, so keep it empty.
'description'=>strip_tags($conf['sitebrief']),
'navs'=>array(),
);
// 运行时数据,存放于 cache_set() / runtime data
$runtime = runtime_init();
// 检测站点运行级别 / restricted access
check_runlevel();
// 全站的设置数据,站点名称,描述,关键词
// $setting = kv_get('setting');
$route = param(0, 'index');
// hook index_inc_route_before.php
if(!defined('SKIP_ROUTE')) {
// 按照使用的频次排序,增加命中率,提高效率
// According to the frequency of the use of sorting, increase the hit rate, improve efficiency
switch ($route) {
// hook index_route_case_start.php
case 'index': include _include(APP_PATH.'route/index.php'); break;
case 'thread':include _include(APP_PATH.'route/thread.php'); break;
case 'forum': include _include(APP_PATH.'route/forum.php'); break;
case 'user': include _include(APP_PATH.'route/user.php'); break;
case 'my': include _include(APP_PATH.'route/my.php'); break;
case 'attach': include _include(APP_PATH.'route/attach.php'); break;
case 'post': include _include(APP_PATH.'route/post.php'); break;
case 'mod': include _include(APP_PATH.'route/mod.php'); break;
case 'browser': include _include(APP_PATH.'route/browser.php'); break;
// hook index_route_case_end.php
default:
// hook index_route_case_default.php
include _include(APP_PATH.'route/index.php'); break;
//http_404();
/*
!is_word($route) AND http_404();
$routefile = _include(APP_PATH."route/$route.php");
!is_file($routefile) AND http_404();
include $routefile;
*/
}
}
// hook index_inc_end.php
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史
.inc php,index.inc.php相关推荐
- java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
哎 这类问题 本来都不打算记录的,但是自己写的时候还是犯了错误,一运行报错了 大致就是list 超出了 ,可能index size 值不一样( Index: 9, Size: 9, Index: 5, ...
- ThinkPHP3.2URL重写隐藏应用的入口文件index.php
可以通过URL重写隐藏应用的入口文件index.PHP,下面是相关服务器的配置参考: [ Apache ] httpd.conf配置文件中加载了mod_rewrite.so模块 AllowOverri ...
- url中去掉index.php,方便redirect()
01 配置文件 return Array( 'URL_MODEL' => '2', ); 02 index.php入口文件下面加入文件 .htaccess -->使用editplus--& ...
- e.V4p.C0/index.php,php-fpm进程在Kubernetes中接收SIGKILL信号
我已经在其中配置了Nginx,PHP和php-fpm创建了ubuntu docker镜像 . 当我在Docker实例上运行它时工作正常 . 但是当我在kubernetes中运行相同的图像时,php-f ...
- 页面自动获取焦点影响页面切换效果_ReactIndex - 让文件夹index页面变得更有实用性 (替换传统Web服务器index页)...
React的学习和家庭需求 工作上有需要接触React,而在正式接触相关产品之前为了了解一些基础.除了标准教程里面的例子意外,总觉得有点不够. 正好孩子他妈最近交给我一个任务: 儿子的学习资料需要整理 ...
- oracle查询不走索引全表扫描,使用索引快速全扫描(Index FFS)避免全表扫描的若干场景-Oracle...
使用索引快速全扫描(Index FFS)避免全表扫描的若干场景 什么使用使用Index FFS比FTS好? Oracle 8的Concept手册中介绍: 1. 索引必须包含所有查询中参考到的列. 2. ...
- key mysql_mysql中key 、primary key 、unique key 与index区别
mysql中索引是非常重要的知识点,相比其他的知识点,索引更难掌握,并且mysql中的索引种类也有很多,比如primary key .unique key 与index等等,本文章向大家介绍mysql ...
- 只需三分钟!只需创建一个vuex.js文件,让你马上学会使用Vuex,尽管Vuex是个鸡肋!(扔掉store文件夹和里面的index、getters、actions、mutations等js文件吧!)
前情提示:有一天,我要实现一个效果→点击某个按钮改变一个全局变量,并且要让绑定了该变量的所有位置异步渲染.我试过用一个全局的js文件存放该变量,该变量值虽然改变了,但是没有做到异步渲染.接着我用win ...
- 存储引擎 K/V 分离下的index回写问题
前言 近期在做on nvme hash引擎相关的事情,对于非全序的数据集的存储需求,相比于我们传统的LSM或者B-tree的数据结构来说 能够减少很多维护全序上的计算/存储资源.当然我们要保证hash ...
- IIS 7.5 去掉index.php 西数服务器
//新建web.config 加上下面代码<?xml version="1.0"?> <configuration> <system.webServe ...
最新文章
- JqueryQrcode生成二维码不支持中文的解决办法
- python 多分类逻辑回归_机器学习实践:多分类逻辑回归(softmax回归)的sklearn实现和tensorflow实现...
- YouTube增加社交功能:邀请联系人聊天 可30人群聊
- 网络层:IP 协议(用于封装 IP)
- 线段树POJ3468(成段更新,区间求和)
- java 微信支付实现
- sqlserver连接和操作数据库
- POJ 1037 DP
- html 遮罩层在底部,底部弹出遮罩层.html
- ADFS部署过程中设置network service对证书的读取权限
- java猫和猫的名字
- 计算机原理学习指导第3版,《计算机组成原理学习指导与习题解析(第3版)》...
- IEC61850概述
- VsCode使用EmmyLua插件调试Unity工程Lua代码
- extmail mysql数据库 重启_一个简单的基于postfix+extmail+mysql的邮件系统
- hdu6080(FLOYD)
- 诺瓦科技2022数字IC设计提前批笔试
- 愿天下有情人都是失散多年的兄妹(25 分)
- LumaQQ源码,注解.下载的用户看一下.
- 11_MySQL笔记-主从复制-延迟备份-读写分离
热门文章
- 第10章第2节:使用iSlide统一所有幻灯片的段落属性 [PowerPoint精美幻灯片实战教程]
- 游戏测试------第1章
- 添加一个mysql用户并给予权限
- 北航计算机学院机器学习导师,郭玉柱 中文主页 模式识别与机器学习(研究生) 北京航空航天大学教师个人主页系统...
- K210基础实验—彩图、灰度图像和黑白图像
- STM32F103Mini移植RT-ThreadNano
- [新手学IOS]项目实战-土豆客户端(2): searchViewController的实现
- socket通信原理及相关函数(详细)总结
- Java抽象类(abstract)的定义和设计模式(模板设计模式)
- 两个开关控制一个灯电路图,一灯二控接线图