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 baseurl?
What is local variable in php?
What is the use of mysql_fetch_array in php?
Give the case where we can use get and we can use post methods?
my english is not too good then what we apply for a php programer post
How can we know that a session is started or not?
3 Answers Rushmore Consultancy,
Tell us how can we access the data sent through the url with the post method?
Why is php so popular?
In How many ways can u represent Not equal?Give Syntax of all ways..
Where is session value stored php?
How can we upload a file in php?
Which of the following represents the proper way to set a session variable? Answer: a. $_SESSION['foo'] = 'bar'; b. session_start(); c. session_set_save_handler ('myopen', 'myclose', 'myread', 'mywrite', 'mydelete', 'mygarbage'); d. $foo = $_SESSION['foo']; 2.When administering MySQL, you should make the data directory accessible via the operating system 3.which statement can be used to determine how the optimizer resolves a query