Xampp showing errors.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp showing errors.

Postby raxius » 28. August 2012 03:53

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?
raxius
 
Posts: 4
Joined: 25. August 2012 07:36
Operating System: Windows

Re: Xampp showing errors.

Postby JJ_Tagy » 28. August 2012 12:10

Use try/catch and throw an exception.
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 123 guests