Showing posts with label ini_set(). Show all posts
Showing posts with label ini_set(). Show all posts

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);