php程序 数据库连接正常 本地访问一直出现“路径或端口错误” 求大神解答
<?phpif(!defined("Copyright")&&(Copyright!="版权所有:#####")){exit("版权所有:#####");}$home=$...
<?php
if (!defined("Copyright") && (Copyright != "版权所有:#####")) {
exit("版权所有:#####");
}
$home = $_SERVER["SERVER_NAME"];
$port = $_SERVER["SERVER_PORT"];
global $Home;
global $sHome;
global $Port;
global $sPort;
$a = 0;
for ($i = 0; $i < count($Home); $i++) {
if (($home == $Home[$i]) && ($port == $Port[$i])) {
$a = 1;
break;
}
else {
if (($home == $sHome[$i]) && ($port == $sPort[$i])) {
$a = 3;
break;
}
else {
if (($home == $dHome[$i]) && ($port == $dPort[$i])) {
$a = 2;
break;
}
else {
if (($home == $hHome[$i]) && ($port == $hPort[$i])) {
$a = 4;
break;
}
}
}
}
}
if ($a == 0) {
exit("路径或端口错误");
}
else {
return $a;
}
?> 展开
if (!defined("Copyright") && (Copyright != "版权所有:#####")) {
exit("版权所有:#####");
}
$home = $_SERVER["SERVER_NAME"];
$port = $_SERVER["SERVER_PORT"];
global $Home;
global $sHome;
global $Port;
global $sPort;
$a = 0;
for ($i = 0; $i < count($Home); $i++) {
if (($home == $Home[$i]) && ($port == $Port[$i])) {
$a = 1;
break;
}
else {
if (($home == $sHome[$i]) && ($port == $sPort[$i])) {
$a = 3;
break;
}
else {
if (($home == $dHome[$i]) && ($port == $dPort[$i])) {
$a = 2;
break;
}
else {
if (($home == $hHome[$i]) && ($port == $hPort[$i])) {
$a = 4;
break;
}
}
}
}
}
if ($a == 0) {
exit("路径或端口错误");
}
else {
return $a;
}
?> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询