Making PHP files easier to edit:

liunx

Guest
Hi,

I was wondering if anyone has a system of filing their php code to make it easier to find and edit parts of it?

I work on the following system, at the moment, but would be interested if anyone has a better solution


wwwroot/
+- home.php // home page
+- headers/
| +- include.php // list of all header files I use
| +- shell.php // contains common code for top, middle and bottom of every page
| +- nav.php // navigation bar and buttons
| +- array.php // array manipulation
+- sections/
+- 001/ // a group of related pages
| +- 001_main/ // variations of content
| | +- page_1.php
| | +- page_2.php
| +- 002_main/
| +- head.php // section title
| +- 001.php // page 1
| +- 001.php // page 2
+- 002/


I have only shown selected folders and files for the php code - not any of the other files for images, css, etc.

Hope its clear enough,
HKI also this system to organize my PHP code. As yet though I cannot think of any other method of doing it. If I find a good one i'll let you know Horus.yeah you have the right idea. but when it comes to code we would want the code we use a lot in a function so we don't have to make a page for it everytime we want it. but yes that is the way to go.thats what the headers are for

glad to know i got a good thinking hat on
 
Back
Top