1 Star 0 Fork 0

李建林/pagekit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
Nikolay Lapay 提交于 2017-03-12 00:53 . Fix check apache mod_rewrite engine
<?php
if (version_compare($ver = PHP_VERSION, $req = '5.5.9', '<')) {
exit(sprintf('You are running PHP %s, but Pagekit needs at least <strong>PHP %s</strong> to run.', $ver, $req));
}
if (PHP_SAPI == 'cli-server' && is_file(__DIR__.parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
return false;
}
if (!isset($_SERVER['HTTP_MOD_REWRITE']) && !isset($_SERVER['REDIRECT_HTTP_MOD_REWRITE'])) {
$_SERVER['HTTP_MOD_REWRITE'] = 'Off';
} else {
$_SERVER['HTTP_MOD_REWRITE'] = 'On';
}
date_default_timezone_set('UTC');
$env = 'system';
$path = __DIR__;
$config = array(
'path' => $path,
'path.packages' => $path.'/packages',
'path.storage' => $path.'/storage',
'path.temp' => $path.'/tmp/temp',
'path.cache' => $path.'/tmp/cache',
'path.logs' => $path.'/tmp/logs',
'path.vendor' => $path.'/vendor',
'path.artifact' => $path.'/tmp/packages',
'config.file' => realpath($path.'/config.php'),
'system.api' => 'https://pagekit.com'
);
if (!$config['config.file']) {
$env = 'installer';
}
if (PHP_SAPI == 'cli') {
$env = 'console';
}
require_once "$path/app/$env/app.php";
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/lijianlin819/pagekit.git
git@gitee.com:lijianlin819/pagekit.git
lijianlin819
pagekit
pagekit
master

搜索帮助