hi all,
i am trying to create a system that takes me somewhat out of the loop so i can concentrate on other thing.
i have written a basic template website for them to use, but i want them to be able to change the basic setup via a webpage....
i have a config file that has all of the connection details, default colours, default text for the site.
i want to be able to allow an admin to create / modify this for a site but am having trouble 1.creating without having to keep modifying permissions (leaving myself a bit open) 2.getting php code into the file.
currently i've been playing with it and had to allow permission to write for all users (not surs is the right way to do it)
but anyway, to the code.
i'm using the method
$fp = fopen("your_new_file.txt", "w");
fwrite($fp, $myBuildVar);
fclose($fp);
where $myBuildVar is the text string i've put together for the file.
The file needs to contain set variables so i can use them throughout the site.... for example i'm trying to create it with the following code
# site background
$myBuildVar = "$confBgCol = '#111111';";
$myBuildVar = $myBuildVar."$confFrCol = '#000000';";
but i get the created file as
= '#111111'; ='#000000';
any ideas on a way to do this??
thankyou, any advice, hints or tips would be greatly appreciated
daveJam
*two wrongs don't make a right..... but three lefts do!!!!*
i am trying to create a system that takes me somewhat out of the loop so i can concentrate on other thing.
i have written a basic template website for them to use, but i want them to be able to change the basic setup via a webpage....
i have a config file that has all of the connection details, default colours, default text for the site.
i want to be able to allow an admin to create / modify this for a site but am having trouble 1.creating without having to keep modifying permissions (leaving myself a bit open) 2.getting php code into the file.
currently i've been playing with it and had to allow permission to write for all users (not surs is the right way to do it)
but anyway, to the code.
i'm using the method
$fp = fopen("your_new_file.txt", "w");
fwrite($fp, $myBuildVar);
fclose($fp);
where $myBuildVar is the text string i've put together for the file.
The file needs to contain set variables so i can use them throughout the site.... for example i'm trying to create it with the following code
# site background
$myBuildVar = "$confBgCol = '#111111';";
$myBuildVar = $myBuildVar."$confFrCol = '#000000';";
but i get the created file as
= '#111111'; ='#000000';
any ideas on a way to do this??
thankyou, any advice, hints or tips would be greatly appreciated
daveJam
*two wrongs don't make a right..... but three lefts do!!!!*