Code:
<?php
$ip = $_SERVER['127.0.0.1'];
exec("ping -n 4 $ip 2>&1", $output, $retval);
if ($retval != 0) {
echo "no!";
}
else
{
echo "yes!"; }
?>
The result is: NO!
why???
|
Go4Expert Member
|
|
| 8Oct2008,14:41 | #1 |
|
I would like to make a simple monitoring. I make this:
Code:
<?php
$ip = $_SERVER['127.0.0.1'];
exec("ping -n 4 $ip 2>&1", $output, $retval);
if ($retval != 0) {
echo "no!";
}
else
{
echo "yes!"; }
?>
The result is: NO! why??? |
|
Go4Expert Member
|
|
| 17Oct2008,10:35 | #2 |
|
What platform are you running the script on?
|