1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/jtbb-jt_psi

Клонировать/Скачать
index.php 725
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
taoys Отправлено 22.03.2020 06:18 9b4403d
<?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()) {
if (file_exists("m.html")) {
// 调用React生成的H5页面
echo file_get_contents("m.html");
} else {
echo "PSI移动端没有正确安装";
}
} else {
header('Location: ' . $_root . '/web/');
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/jtbb-jt_psi.git
git@api.gitlife.ru:oschina-mirror/jtbb-jt_psi.git
oschina-mirror
jtbb-jt_psi
jtbb-jt_psi
master