1 Star 1 Fork 169

zhenyangze/xiunobbs

forked from xiuno/xiunobbs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model.inc.php 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
xiuno 提交于 2018-01-05 21:43 . 3.1
<?php
!defined('DEBUG') AND exit('Forbidden');
// 可以合并成一个文件,加快速度
// merge to one file.
// hook model_inc_start.php
$include_model_files = array (
APP_PATH.'model/kv.func.php',
APP_PATH.'model/queue.func.php',
APP_PATH.'model/group.func.php',
APP_PATH.'model/user.func.php',
APP_PATH.'model/forum.func.php',
APP_PATH.'model/forum_access.func.php',
APP_PATH.'model/thread.func.php',
APP_PATH.'model/thread_top.func.php',
APP_PATH.'model/post.func.php',
APP_PATH.'model/attach.func.php',
APP_PATH.'model/check.func.php',
APP_PATH.'model/mythread.func.php',
APP_PATH.'model/runtime.func.php',
APP_PATH.'model/table_day.func.php',
APP_PATH.'model/cron.func.php',
APP_PATH.'model/form.func.php',
APP_PATH.'model/misc.func.php',
APP_PATH.'model/session.func.php',
// hook model_inc_file.php
);
// hook model_inc_include_before.php
if(DEBUG) {
foreach ($include_model_files as $model_files) {
include _include($model_files);
}
} else {
$model_min_file = $conf['tmp_path'].'model.min.php';
$isfile = is_file($model_min_file);
if(!$isfile) {
$s = '';
foreach($include_model_files as $model_files) {
$s .= php_strip_whitespace(_include($model_files));
}
$r = file_put_contents($model_min_file, $s);
unset($s);
}
include $model_min_file;
}
// hook model_inc_end.php
/*
function xn_php_strip_whitespace($file) {
$s = php_strip_whitespace($file);
if(substr($s, 0, 5) == '<?php') {
$s = substr($s, 5);
}
if(substr($s, -2) == '?>') {
$s = substr($s, 0, -2);
}
return $s;
}*/
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/zhenyangze/xiunobbs.git
git@gitee.com:zhenyangze/xiunobbs.git
zhenyangze
xiunobbs
xiunobbs
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385