GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-May-2004, 05:49
dopee dopee is offline
Awaiting Email Confirmation
 
Join Date: Feb 2004
Location: south africa
Posts: 109
dopee will become famous soon enough

php & txt files


So i'm making this website with a menu on either side of the center content. Now I made the design template in html, but now have realised a lil problem. If I want to change the menus on either side in any way, I have to change each and every html page.

Then I decided ok an easy way to fix this would to use php to read from a text file to dispay the content from the text file in html. This is all good so far, I know how to code using php to read and write to a text file.

So my question is this: when the html page is loaded, the php uses the content of a text file for the menus. Now the site i'm building will be populated quite a lot, so what I need to know is will this method take up server time etc? I'm still sketching on retrieving data from a database and this method will make my life a lot easier.

When I get this to work, changing the menus will be as easy as editing the text files (using php) online.
  #2  
Old 03-May-2004, 09:10
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Did you go through this thread before? (see the example code towards the bottom of the thread). Can you use something like that instead? Otherwise, you'd have to be more specific.
  #3  
Old 04-May-2004, 11:19
dopee dopee is offline
Awaiting Email Confirmation
 
Join Date: Feb 2004
Location: south africa
Posts: 109
dopee will become famous soon enough
aight yes that's soughta what I want to be doing, but without using inc files I will be using text files because I can then edit the text files online using php. Therefore: change only the text in the external txt files and all menus will change without having to change the html of every page.
So can I do this...is this an acceptable way of accessing data?
  #4  
Old 05-May-2004, 06:31
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Yes, of course... whether the file is .inc or .txt should not matter (also considering that you have set up the correct permissions for reading and writing to the files) if you simply want to be able to edit the files online.
  #5  
Old 05-May-2004, 18:40
Div's Avatar
Div Div is offline
Moderator
 
Join Date: May 2002
Posts: 996
Div has a spectacular aura aboutDiv has a spectacular aura about
If you are already using a database for the content, it would probably easier than playing around with text files.
__________________
Web Hosting Tips | Career Advice
  #6  
Old 06-May-2004, 03:05
dopee dopee is offline
Awaiting Email Confirmation
 
Join Date: Feb 2004
Location: south africa
Posts: 109
dopee will become famous soon enough
Quote:
Originally Posted by Div
If you are already using a database for the content, it would probably easier than playing around with text files.

I havent quite grasped accessing databases as of yet. But I will be adding my own sqldb driven cms at a later stage once i've learned more transact sql code. I'm soughta starting at the bottom and moving on up with this site...so editable menu files first; then random text generator; then adding secret section; then hopefully adding a 'newsphp' type script that will easily incorporate into my current design in html which will be the content of every page.
Yup im on a big learning curve with this site. Thankgod for my 'teach urself php' book that I bought the other day.
peace
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing your web server with Turck MMCache for PHP JdS Web Hosting Forum 2 07-Jan-2004 07:48
apache2 - php cgi fehler - schleife inna Apache Web Server Forum 8 27-Nov-2003 09:55
[Linux] Installing PHP --with-mcrypt JdS Web Hosting Forum 0 20-Aug-2003 08:40
PHP in HTML jrobbio Web Design Forum 4 24-Jul-2003 06:05
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:39.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.