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 |
What is php string function?
What is the use of mysql_real_escape_string() function?
What is difference between session and cookie in PHP?
Is it possible to destroy a cookie?
write a program to print [123] [456] [789] note : braces also need to be printed
What is the purpose of break and continue statement?
What are the ways to include file in php?
> symbol is used to redirect the output of a command. State Whether True or False?
how can we check mail function with '127.0.0.1' (before submitting a site?
What is a variable cost example?
What is a query in php?
What is a base url?