This function is sued for setting the error reporting level at runtime. To completely disable error reporting, the value is ‘0’ zero. syntex:
int error_reporting ([ int $level ] )
Other kind of error reporting levels
1 E_ERROR // Fatal run-time errors.
2 E_WARNING // Run-time warnings (non-fatal errors).
4 E_PARSE // Compile-time parse errors.
8 E_NOTICE // Run-time notices.
16 E_CORE_ERROR // Fatal errors that occur during PHP's initial startup.
32 E_CORE_WARNING // Warnings (non-fatal errors) that occur during PHP's initial startup.
64 E_COMPILE_ERROR // Fatal compile-time errors.
128 E_COMPILE_WARNING // Compile-time warnings.
256 E_USER_ERROR // User-generated error message.
512 E_USER_WARNING // User-generated warning message.
1024 E_USER_NOTICE // User-generated notice message.
2048 E_STRICT // Enable to have PHP suggest changes to your code which will ensure the best practice.
4096 E_RECOVERABLE_ERROR // Catchable fatal error.
8192 E_DEPRECATED // Warnings about code that will not work in future versions.
16384 E_USER_DEPRECATED // User-generated warning message.
32767 E_ALL // All errors and warnings.
Using combinations of error levels Example:
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);
// Report all PHP errors (see changelog)
Link to this post!
Basically what ini_set() does is, sets the value of the given configuration option. The configuration option will keep this new value during the script’s execution, and will be restored at the script’s ending. It takes 2 parameters, 1 is variable name, and other is value. I have used the ini_set() function mostly to set the […]
One of the common complex task among webdevelopers is image resizing. It is a big headach when using multiple size images in multiple pages of a single version of image. For long I was using a an script that would create one thumnail version of the image when the image is uploaded. It was not […]
jQuery content fade (rotate/slide) plugin is a multipurpose jQuery tool for displaying content. This is a great tool to present news, events, announces, press releases, and other content to your website page. Features Light-weight, fast and simple. Auto/Manual rotate. Customizable animation speed. Control key for previouse/next/pause/play. Use your own CSS. Multiple item in a single […]
If you are a Drupal developer, you probably know how to save a node using node_save() function. I am coming across saving node with CCK fields so often. I had no any issue while on the D6. First time on the Drupal 7, it hurt me lot leaving CCK field blank when saving where I […]
I wanted to run a SQL query against MySQL database server which contains search string and need to be formated using sprintf. The problem arise when format. It is because of the sign “%” am using to advance my search term. The query was…
$sql = "SELECT * FROM user WHERE country = '%s' AND fName LIKE '%s%' ORDER BY fName";
$sql = sprintf($sql, $country, $searchTerm);
Here where the error fires. Thanks God, I found the […]
Sorry! There was a server failiure and we lost some contents. Please be patient untill we restore the backup. If you have any comments, you can use the form below or contact me throught the contact form here Thank you for your time with encodez.com Link to this post!