![]() |
|
#1
|
|||
|
|||
php & txt filesSo 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
|
||||
|
||||
|
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.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
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.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
||||
|
||||
|
If you are already using a database for the content, it would probably easier than playing around with text files.
|
|
#6
|
|||
|
|||
|
Quote:
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 GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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