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 |
Tell me how do I escape data before storing it into the database?
Is php a low level language?
What are major variables in research?
What is polymorphism?
What is the difference between unlink and unset ?
Do you know how to delete a file from the system?
What is the use of the function 'imagetypes()'?
What is mod_php?
which institute provide better PHP trainning in delhi? please tell me how much salary can freshers get ? thanku
Why is overriding runtime?
Explain about PHP cookies?
What is the difference between PHP,ASP and JSP?