5 Star 3 Fork 5

zhangjian / PSI_AutoParts_Industry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 620 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
zhangjian 提交于 2016-06-23 13:14 . 加入PSI框架内容
<?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/toalson/PSI_AutoParts_Industry.git
git@gitee.com:toalson/PSI_AutoParts_Industry.git
toalson
PSI_AutoParts_Industry
PSI_AutoParts_Industry
master

搜索帮助

14c37bed 8189591 565d56ea 8189591