1 Star 0 Fork 169

anylzer/xiunobbs

forked from xiuno/xiunobbs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.php 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
xiuno 提交于 2017-03-06 16:35 . fix
<?php
/*
* Copyright (C) xiuno.com
*/
//$_SERVER['REQUEST_URI'] = '/?search-test.htm';
//$_SERVER['REQUEST_URI'] = '/?qq_login.htm';
//$_SERVER['REQUEST_URI'] = '/?user-login.htm';
//$_SERVER['REQUEST_METHOD'] = 'POST';
//$_SERVER['HTTP_X_REQUESTED_WITH'] = 'xmlhttprequest';
//$_COOKIE['bbs_sid'] = 'e1d8c2790b9dd08267e6ea2595c3bc82';
//$postdata = 'email=admin&password=c4ca4238a0b923820dcc509a6f75849b';
//parse_str($postdata, $_POST);
// 本地开启 DEBUG 模式
!isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
if($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || substr($_SERVER['REMOTE_ADDR'], 0, 8) == '192.168.') {
define('DEBUG', 2);
}
// 0: Production mode; 1: Developer mode; 2: Plugin developement mode;
// 0: 线上模式; 1: 调试模式; 2: 插件开发模式;
!defined('DEBUG') AND define('DEBUG', 0);
define('APP_PATH', dirname(__FILE__).'/'); // __DIR__
!defined('ADMIN_PATH') AND define('ADMIN_PATH', APP_PATH.'admin/');
!defined('XIUNOPHP_PATH') AND define('XIUNOPHP_PATH', APP_PATH.'xiunophp/');
// !ini_get('zlib.output_compression') AND ob_start('ob_gzhandler');
//ob_start('ob_gzhandler');
$conf = (@include APP_PATH.'conf/conf.php') OR exit('<script>window.location="install/"</script>');
// 转换为绝对路径,防止被包含时出错。
substr($conf['log_path'], 0, 2) == './' AND $conf['log_path'] = APP_PATH.$conf['log_path'];
substr($conf['tmp_path'], 0, 2) == './' AND $conf['tmp_path'] = APP_PATH.$conf['tmp_path'];
substr($conf['upload_path'], 0, 2) == './' AND $conf['upload_path'] = APP_PATH.$conf['upload_path'];
if(DEBUG > 1) {
include XIUNOPHP_PATH.'xiunophp.php';
} else {
include XIUNOPHP_PATH.'xiunophp.min.php';
}
// 测试数据库连接 / try to connect database
db_connect() OR exit($errstr);
include APP_PATH.'model/plugin.func.php';
include _include(APP_PATH.'model.inc.php');
include _include(APP_PATH.'index.inc.php');
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/anylzer/xiunobbs.git
git@gitee.com:anylzer/xiunobbs.git
anylzer
xiunobbs
xiunobbs
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385