Hey everyone, just wondering how to change the php.ini settings on the go, without having to actually go and edit the file. I'm wanting to make an contact form, and set the SMTP and other settings only for the time that the form is open. Anyone know how?
Changing PHP.ini settings on the go - ?
G'Day,
Check out
string ini_set ( string varname, string newvalue)
I think this is what you need.
HalfaBee
Are u sure it is on runtime?
My php.ini file has 'session.save_path' as c:/abc
I have added the following lines to my session object
to save session file in c:/xyz folder
echo ini_get('session.save_path');
ini_set('session.save_path',"c:/xyz/");
echo ini_get('session.save_path');
output for the above code is like c:/abc c:/xyz which
sounds good. but session files are getting createing
in c:/abc.
Apart from save_path any parameter i set
(ex: session.auto_start )using ini_set
at run time is not taking effect.
Any clues will be greatly appreciated!!