php include file
- Started
- Last post
- 4 Responses
- cosmo
my boss wants me to write an include file, with all the function the application is going to use. The include is already over 2700 lines of code. I hate doing in such a method, I like having different include files for different sections.
How do you guys write your code?
- mike0
break it apart into more of an inherited structure... so you can put the top-most include somewhere and then have the other includes grab their predecessor on the way down. intimately, the actual page builds will only include the last file in the chain and your boss won't know the different. in trade, you will have a nicely organized library of cascading include files. and make sure to user require_once and not include.
<3
- tfs__mag0
hey mike.. sorry to be a pest but how's the redesign coming?
- cosmo0
good idea. Will do that. But it is still annoying.
- mike0
well, if you were doing it based on an object oriented design, you would more or less do it this way... it's pretty standard... even in java, c# etc you import or include files to build objects that then get referenced/extended anyway... same concept.