Watch 1 Star 2 Fork 147

深圳优创智投科技有限公司 / uctooPHP

forked from uctoo / uctoo 
Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
UCToo是一套简单,易用,开源的微信增值应用开发框架。技术选型thinkphp,opencenter,wechat-php-sdk,weui,jquery... spread retract

Clone or download
index.php 2.77 KB
Copy Edit Web IDE Raw Blame History
wxfsen authored 2016-05-10 17:54 . 版本复核
<?php
//slog uctoo add
//include './SocketLog.class.php';
//slog(array(
// 'error_handler'=>true,
// 'optimize'=>true,
// 'show_included_files'=>true,
//),'set_config');
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
function reset_session_path()
{
$root = str_replace("\\", '/', dirname(__FILE__));
$savePath = $root . "/tmp/";
if (!file_exists($savePath))
@mkdir($savePath, 0777);
session_save_path($savePath);
}
//reset_session_path(); //如果您的服务器无法安装或者无法登陆,又或者后台验证码无限错误,请尝试取消本行起始两条左斜杠,让本行代码生效,以修改session存储的路径
if (version_compare(PHP_VERSION, '5.3.0', '<')) die('require PHP > 5.3.0 !');
/*移除magic_quotes_gpc参数影响*/
if (get_magic_quotes_gpc()) {
function stripslashes_deep($value)
{
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
return $value;
}
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
}
/*移除magic_quotes_gpc参数影响end*/
define ('APP_DEBUG', true);
define ('APP_PATH', './Application/');
/**
* 系统调试设置
* 项目正式部署后请设置为false
//mp.weixin.qq.com,开发者中心,服务器配置,Token(令牌)
*/
define ('APP_TOKEN', 'uctoo');
/**
* 主题目录 OpenCenter模板地址 (与ThinkPHP中的THEME_PATH不同)
* @author 郑钟良<zzl@ourstu.com>
*/
define ('OS_THEME_PATH', './Theme/');
if (!is_file( 'Conf/user.php')) {
header('Location: ./install.php');
exit;
}
/**
* 缓存目录设置
* 此目录必须可写,建议移动到非WEB目录
*/
define ('RUNTIME_PATH', './Runtime/');
/**
* 引入核心入口
* ThinkPHP亦可移动到WEB以外的目录
*/
try{
require './ThinkPHP/ThinkPHP.php';
}catch (\Exception $exception){
if($exception->getCode()==815){
send_http_status(404);
$string=file_get_contents('./404.html');
$string=str_replace('$ERROR_MESSAGE',$exception->getMessage(),$string);
$string=str_replace('HTTP_HOST','http://'.$_SERVER['HTTP_HOST'],$string);
echo $string;
}else{
E($exception->getMessage(),$exception->getCode());
}
}

Comment ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/UCT/uctoo.git
git@gitee.com:UCT/uctoo.git
UCT
uctoo
uctoo
master

Help Search