代码如下
<?php
$mysql = new SaeMysql();
$sql = "SELECT * FROM ip
";
$data = $mysql->getData( $sql );
$mysql->runSql($sql);
$mysql->closeDb();
function ping($url)
{
$url="http://".$url;
if(fopen($url,"r"))
{
return 1;
}else
{
return 0;
}
}
if (ping($data[0]['ip'])+ping($data[1]['ip']) < 2) {
}
else
{
echo "Server IS ok</br>";
}
if (ping($data[0]['ip']) + ping($data[1]['ip']) + ping($data[2]['ip']) + ping($data[3]['ip']) == 4) {
echo "Server IS ok</br>";
}
放在根目录执行没问题
子目录执行会报错
Parse error: syntax error, unexpected end of file in /data1/www/htdocs/580/aliyunapi/1/app/index.php on line 62
地址:
aliyunapi.sinaapp.com/app/index.php
和
aliyunapi.sinaapp.com/index.php
求帮忙解答。我的代码里没有涉及到目录操作啊
1
xiqingongzi OP 已解决
|
2
xfspace 2015-10-07 22:37:39 +08:00 via iPad
code 不完整,跳到 62 行自查
|