RE: [PHP-WIN] @mssql_connect() versus mssql_connect()
| From: | tg-php at gryffyndevelopment dot com | Date: | Fri, 13 Oct 2006 15:13:50 +0000 |
| Subject: | RE: [PHP-WIN] @mssql_connect() versus mssql_connect() | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-27241@lists.php.net to get a copy of this message | ||
As mentioned, the @ suppresses any errors, warnings, notices, etc that the command will give. This
is typically considered really bad programming practice.
If you resort to using an @ to suppress, one of two things is an issue:
1. Either error reporting is set to high and you're getting warnings and notices when you
don't want to... in which case you can just turn down the error reporting a bit.
2. Or there's an error and instead of trying to fix the error and program correctly, the
programmer choses to just bury the error. Which isn't so good.
The only time I've ever had to use @ to suppress an error was with an fgets() call that
produced the following error:
"Warning: fgets(): SSL: fatal protocol error in /var/www/secure/scriptname.php"
I didn't save the link to the bug, but it's apparently a bug in PHP and the only solution
I found was to suppress the error and everything works fine (despite the warning).
-TG
= = = Original message = = =
The @ is for error suppression
-----Original Message-----
From: Alf Stockton [mailto:alf@stockton.co.za]
Sent: Friday, October 13, 2006 12:00 AM
To: php-windows
Subject: [PHP-WIN] @mssql_connect() versus mssql_connect()
What is the difference between @mssql_connect() and mssql_connect()?
i.e. What is the relevance of the prefixed @?
--
Regards,
Alf Stockton~~www.stockton.co.za
You may my glories and my state dispose, But not my griefs; still am I
king of those.
~~-- William Shakespeare, "Richard II"
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.