1 Star 0 Fork 46

NoC/Pichome

forked from zyx0814/Pichome 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.php 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
zyx0814 提交于 2024-02-06 00:03 . PicHome 2.0.1
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
error_reporting(0);
define('APPTYPEID', 1);
define('CURSCRIPT', 'dzz');
define('DZZSCRIPT', basename(__FILE__));
define('BASESCRIPT', basename(__FILE__));
$routefile = 'data/cache/'. 'route.php';
$routes = require_once $routefile;
if(isset($routes['pathinfo'])){
if ((!isset($_SERVER['PATH_INFO']) || !$_SERVER['PATH_INFO'])&& isset($_SERVER['REQUEST_URI'])) {
$_SERVER['PATH_INFO'] = strstr($_SERVER['REQUEST_URI'], '?', true);
if ($_SERVER['PATH_INFO'] === false) {
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
}
}
$pathInfo = isset($_SERVER['PATH_INFO']) ? trim($_SERVER['PATH_INFO']):'';
if (strpos($pathInfo, '/') === 0) {
$pathInfo = substr($pathInfo, 1);
}
$url = array_search($pathInfo,$routes);
if($url){
$queryString = parse_url($url, PHP_URL_QUERY);
$hash = parse_url($url, PHP_URL_FRAGMENT);
parse_str($queryString, $_GET);
if ($hash) {
parse_str($hash, $hashparam);
}
$_GET['hashparams'] = json_encode($hashparam);
}
}
require __DIR__.'/core/dzzstart.php';
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/No_C/Pichome.git
git@gitee.com:No_C/Pichome.git
No_C
Pichome
Pichome
master

搜索帮助