-
Notifications
You must be signed in to change notification settings - Fork 0
setHTML
Ayoob edited this page Apr 11, 2020
·
2 revisions
[easySQLite3 >= v0.1.0 (Beta)]
Change the output new line to <br>
instead of \n
.
setHTML( boolean $html ) : boolean
Changing the output new line to HTML format <br>
instead of \n
.
This will work only for the output text by the class when the verbose level is 2
or above.
Note: this doesn't effect lastMessage() function.
Parameter | Description |
---|---|
html |
Setting this parameter to true will output <br> , and false will output \n . |
The function should return a boolean representing the html output you set. It should be the same value as $html
unless it couldn't update the variable.
Example #1 : Set output as HTML
include "easySQLite3.class.php";
$db = new easySQLite3("database.sqlite");
$db->setVerbose(2);
$db->setHTML( true );
$db->connect("database.sqlite");
This will output:
[Connect]: Database already connected.
<br>
Example #2 : Set output as plain-text
include "easySQLite3.class.php";
$db = new easySQLite3("database.sqlite");
$db->setVerbose(2);
$db->setHTML( false );
$db->connect("database.sqlite");
This will output:
[Connect]: Database already connected.
- setVerbose - Set the verbose level of the class.
- getVerbose - Get the current verbose level of the class.
- getMessage - Returns the last message that was set by the class.