1 Star 0 Fork 872

小许哥哥 / PSI

forked from CRM8000 / PSI 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 641 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
CRM8000 提交于 2015-11-15 07:40 . H5 - 登录
<?php
require "Mobile_Detect.php";
$_isCGI = (0 === strpos(PHP_SAPI, 'cgi') || false !== strpos(PHP_SAPI, 'fcgi')) ? 1 : 0;
if ($_isCGI) {
// CGI/FASTCGI模式下
$_temp = explode('.php', $_SERVER['PHP_SELF']);
$_phpFile = rtrim(str_replace($_SERVER['HTTP_HOST'], '', $_temp[0] . '.php'), '/');
} else {
$_phpFile = rtrim($_SERVER['SCRIPT_NAME'], '/');
}
$_root = rtrim(dirname($_phpFile), '/');
$_root = ($_root == '/' || $_root == '\\') ? '' : $_root;
$detect = new Mobile_Detect();
if ($detect->isMobile()) {
header('Location: ' . $_root . '/web/Mobile');
} else {
header('Location: ' . $_root . '/web/');
}
PHP
1
https://gitee.com/xiaoxugege/PSI.git
git@gitee.com:xiaoxugege/PSI.git
xiaoxugege
PSI
PSI
master

搜索帮助

14c37bed 8189591 565d56ea 8189591