I have a file that contains settings and there are a lot of comments in
there and a lot of variables.  An excerpt of the file looks like below.  My
question is, is it possible to change only certain variables?  For example,
I want to set just the db variables, is it possible for me to input the new
values in a form and replace only those in the file without having to
rewrite the entire file?

$mailtype = 0;     # 0 - sendmail, 1 - SMTP

########## Database Info ##########
$db_name = "name";
$db_user = "user";
$db_passwd = "pass";
$db_server = "localhost";

########## Directories/Files ##########
# Note: directories other than $imagesdir do not have to be changed unless
you move things

$boarddir = ".";     # The absolute path to the folder (usually can be left
as '.')
$sourcedir = "./Sources";           # Directory with source files



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to