PHP @ at Mark function, Phpat mark function
Look at the PHP code, there are always some lines in front of the @ symbol, always do not know what the meaning. For example dede5.7 @ $ni =imagecreatetruecolor ($ftoW, $ftoH);
If you use it today, just remember it. In fact, it is the error control, that is, even if an error occurs, ignore the error message, continue to execute the code below.
@$page=$_get[' page ']? intval ($_get[' page ']): 1;
This is the value from the URL to get the page keyword, such as "index.php?page=5", then the $page will be taken to 5.
But if there is an error, such as "index.php" after the page keyword, if you go to fetch $_get[' page ' does not exist will be an error, then there is @ can ignore this small error.
Another example:
$conn = Mysqli_conncet ("Q", "W", "E", "R");
This will enter an error message about connecting to the database.
If the $conn is preceded by the @, you can not let him output the error message.
@$conn = Mysqli_conncet ("Q", "W", "E", "R");
Here's a little bit of a note.
PHP function post-add & function [at]
For reference.
[PHP] Why some functions are preceded by @ (at)
Causes the function to execute without outputting any error messages to the page.
For example, if you use
Require (discuz_root. /forumdata/cache/cache_settings.php ');
If the cache_settings.php file is not found, it will be an error.
, but add the @ will not be an error
http://www.bkjia.com/PHPjc/890824.html www.bkjia.com true http://www.bkjia.com/PHPjc/890824.html techarticle php @ at the function of the mark, Phpat notation function to see the PHP code, there are always some lines in front of the @ symbol, has not known what meaning. For example dede5.7 @ $ni =imagecreatetruecolor ($ftoW, $ftoH) ...