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 |
Is java is better than php?
What library is used for pdf in php?
can any one tell how to install LAMP server in terminal in ubuntu.....and also tell please how to run php files in ubunut and how to save and compile in ubuntu..i already installed ubuntu ..but i dont installed lamp server so i want to install lamp server in terminal is it possible please reply
Why do we use htaccess
Which is faster for or foreach?
•How to access crystal reports through PHP code?
What is session cookies php?
what is the difference between GET,POST and REQUEST in php
What is a persistent cookie in php?
How to include variables in double-quoted strings?
How to calculate the difference between two dates using php?
Why ide is recommended for use while programming with php?