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 to run PHP in command line?
8 Answers InfoShore, Ramp Green, Xtreeme,
What is PHP?
How check field is empty or not in php?
What is api used for?
What are sql injections, how do you prevent them and what are the best practices?
Can we embedded directly PHP code into XHTML document? State Whether True or False?
Sir, I want sbi clearical post model question paper please sent my mail id srinivas_33000@ahoo.co.in
0 Answers State Bank Of India SBI,
What is the use of preg_match in php?
How is it possible to cast types in php?
What is difference between get and post in php?
How can we access the data sent through the url with the get method?
Write a query to to delete duplicate rows?