Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Monday, October 3, 2011

Wednesday, September 28, 2011

Mail function arguments in PHP

mail($to, $subject, $body);

Destroy a session in PHP

We can destroy session in php in two ways. If you wish to delete some session data, you can use the unset() or the session_destroy() function. The unset() function is used to free the specified session variable

Inheritance in PHP

It doesn't support multiple inheritence.PHP supports Multi-level inheritance. But using interface we can achieve multiple inheritance in PHP

Friday, September 23, 2011

How to configure php.ini file settings in PHP code?

You can use ini_set() function to change the php.ini file configuration variables. init_set(variable, value);

List of possible variable can change using ini_set() function.
SMTP
smtp_port
sendmail_from
max_execution_time
display_errors
memory_limit
upload_max_filesize
max_input_time
error_reporting
etc...

For example:
ini_set('max_execution_time', 120);