php api 实例maccms,api.php · VDnnc/MacCmsV10内容管理系统 - Gitee.com

/*

'软件名称:苹果CMS 源码库:https://github.com/magicblack

'--------------------------------------------------------

'Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

'遵循Apache2开源协议发布,并提供免费使用。

'--------------------------------------------------------

*/

header('Content-Type:text/html;charset=utf-8');

// 检测PHP环境

if(version_compare(PHP_VERSION,'5.5.0','=5.5,请升级【PHP version requires > = 5.5,please upgrade】');

//超时时间

@ini_set('max_execution_time', '0');

//内存限制 取消内存限制

@ini_set("memory_limit",'-1');

// 定义应用目录

define('ROOT_PATH', __DIR__ . '/');

define('APP_PATH', __DIR__ . '/application/');

define('MAC_COMM', __DIR__.'/application/common/common/');

define('MAC_HOME_COMM', __DIR__.'/application/index/common/');

define('MAC_ADMIN_COMM', __DIR__.'/application/admin/common/');

define('MAC_START_TIME', microtime(true) );

define('BIND_MODULE','api');

define('ENTRANCE', 'api');

$in_file = rtrim($_SERVER['SCRIPT_NAME'],'/');

if(substr($in_file,strlen($in_file)-4)!=='.php'){

$in_file = substr($in_file,0,strpos($in_file,'.php')) .'.php';

}

define('IN_FILE',$in_file);

if(!is_file('./application/data/install/install.lock')) {

header("Location: ./install.php");

exit;

}

if (!@mb_check_encoding($_SERVER['PATH_INFO'], 'utf-8')){

$_SERVER['PATH_INFO']=@mb_convert_encoding($_SERVER['PATH_INFO'], 'UTF-8', 'GBK');

}

// 加载框架引导文件

require __DIR__ . '/thinkphp/start.php';

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值