class Database
{
public static $_instance;
public static function getInstance()
{
if(!isset(self::$_instance))
self::$_instance = new Database(DB_SERVER, DB_USER,
DB_PASS, DB_NAME);
print_r(self::$_instance);
return self::$_instance;
}
}
can any one explain "self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);" this line
Answer / guest
self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
It represents object creation of the class 'Database'.
| Is This Answer Correct ? | 0 Yes | 0 No |
how many type of url?
What are the advantages of indexes?
What is php and what does it do?
Which function is used in php to delete a file?
sort term descripttion form, report and uery
Where are sessions stored php?
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
Tell me what is the use of "ksort" in php?
How many Types of COmments are there in PHP and what are they?
What’s the difference between htmlentities() and htmlspecialchars()?
Where session is stored?
How do I run a php script?