|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Reading And Writing From Flat config.inc.php file
hello,
im looking for someone that can make me a script, i have several $variables in my config.inc.php file now what i want is a editconfig.php which reads the variables that are currently set in the config line for example, on line 2 there is $headerfile = "include/pages/header.php" now what i want is for that information to come up in a text box that the user can edit and click submit, and then it writes it to that line again, and the same for all the variables, at the moment they are only $headerfile $footerfile and $pagetitle. if anyone could be as so kind to point me in the write direction or write this for me i would be most greatful, i have tried myself and got stuck at i tried using the $_post['formname'] function but i would have to do and as iam nt a php coder i cannot think what to try so i though i would ask on here if anyone could write that for me $fp = fopen("config.inc.php","a"); if(!$fp) { print "error! The file could not be opened"; exit; } that is the only bit i actually good get to work so please somebody help me, i will be very greatfull |
|
#2
|
||||
|
||||
|
I'll check back later tonight and perhaps write it up for you.
|
|
#3
|
|||
|
|||
|
Quote:
i would be most greatful if you could ive tried putting this also into the index file <?php if ($_get['action'] == 'links') { include "links.php" } ?> but thatkeeps returning something like undefined index action on line 2 but that is all that is in the index.php so do i need to define it or something maybe using a function or something, but if you could write it up for me i would be most greatful jus something basic like jus action links for now then i could maybe put in a elseif or something |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Reading And Writing From Flat config.inc.php file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|