PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 31st, 2004, 10:05 PM
devonknows devonknows is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 devonknows User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 1st, 2004, 12:45 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 6
I'll check back later tonight and perhaps write it up for you.

Reply With Quote
  #3  
Old November 1st, 2004, 02:19 PM
devonknows devonknows is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 devonknows User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by Viper_SB
I'll check back later tonight and perhaps write it up for you.

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

Reply With Quote
  #4  
Old November 3rd, 2004, 02:30 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 6
instead of reinventing the wheel check our PEAR here is a config one

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Reading And Writing From Flat config.inc.php file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT