set the configuration for particular session

set the configuration for particular session
    set the configuration for particular session:

Instead of editing the php.ini in the server. Using ini_set() function to change the value of configuration for particular execution.
On set the value of configuration,It will return the old value on success and wrong value on failure. The configuration option will keep this new value during the script’s execution, and will be restored at the script’s ending

Syntax:
string ini_set ( string varname, string newvalue);

For example:

To change uploading maximum filesize on exection

<?php
ini_set(’upload_max_filesize’, ‘2mb’);
?>

it will change the configuration for particular execution

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.