Page 1 of 1

Xampp showing errors.

PostPosted: 28. August 2012 03:53
by raxius
i one of my php codes has an error suchas if i am using this code VVVVV

<?php
if (fsockopen('IP Address', 3306))
{
echo('Status: Online');
}
else
{
echo('Status: Offline');
}
?>

and that server is down, it will display a long long long error code telling me what is wrong instead of just saying... Status: Offline

how do i change this?

Re: Xampp showing errors.

PostPosted: 28. August 2012 12:10
by JJ_Tagy
Use try/catch and throw an exception.