PHP MySQLi: debug() function
mysqli_debug() function / mysqli::debug
The mysqli_debug() function / mysqli::debug is used to perform debugging operations.
Note: In order to use this function, you must compile the MySQL client library to support debugging.
Syntax:
Object oriented style
bool mysqli::debug ( string $message )
Procedural style
bool mysqli_debug ( string $message )
Usage: Procedural style
mysqli_debug(message);
Parameter:
Name | Description | Required/Optional |
---|---|---|
massage | A string that represents the debugging operation to perform | Required |
Return value:
Returns TRUE.
Version: PHP 5, PHP 7
Example:
<?php
/* Create a trace file in '/tmp/client.trace' on the local (client) machine: */
mysqli_debug("d:t:o,/tmp/client.trace");
?>
See also
Previous: connect
Next: dump_debug_info
PHP: Tips of the Day
To use the constant simply use its name:
Example:
if (EARTH_IS_FLAT) { print "Earth is flat"; } print APP_ENV_UPPERCASE;
Output:
or if you don't know the name of the constant in advance, use the constant function:
// this code is equivalent to the above code $const1 = "EARTH_IS_FLAT"; $const2 = "APP_ENV_UPPERCASE"; if (constant($const1)) { print "Earth is flat"; } print constant($const2);
Output:
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook