A large application should be a set of well organized files having one
single include at the top.
And in that include you do all kind of things.
Of course auto_prepend works always better /... but not always possible,
right...
use classes, reuse files ... libraries etc ...
Cheers,
Maxim Maletsk
Joe,
I believe that the concept of the Zend Cache shows the contrary. It
basically pre-parses scripts and stores them in memory. Zend.com give
figures up to 603% performance increase
(http://www.zend.com/cguidemo/benchmark_frame.html). Part of this
certainly is due to less disk access, the other
ed?
> > >
> > > -Jonathan
> > >
> > > > -Original Message-----
> > > > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, February 14, 2001 5:11 PM
> > > > To: Ben Peter
> > > > Cc: John McCreesh; [EMA
Message-
> > > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 14, 2001 5:11 PM
> > > To: Ben Peter
> > > Cc: John McCreesh; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Structuring large PHP programs
> > >
> &g
Any particular reason you don't do something like:
$whatever="blah";
include($whatever);
This eliminates the need for potentially dozens of case/switch statements.
If you're interested, we're developing a more structured way of handling
this with classes, and I could demonstrate some of this to
t included?
>
> -Jonathan
>
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 14, 2001 5:11 PM
> > To: Ben Peter
> > Cc: John McCreesh; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Structuring large PHP programs
&
PM
> To: Ben Peter
> Cc: John McCreesh; [EMAIL PROTECTED]
> Subject: Re: [PHP] Structuring large PHP programs
>
>
> The way I normally do it is I have ONE main include (usually init.inc)
> and then all files that I might need throught my page I put in init.inc
>
> I wor
The way I normally do it is I have ONE main include (usually init.inc)
and then all files that I might need throught my page I put in init.inc
I works nicely for me.
--Joe
On Wed, Feb 14, 2001 at 09:15:35PM +0100, Ben Peter wrote:
> John,
>
> part of this is a matter of taste - I would person
I would use a combination of both,
Have all of your backend settings (including db info) in one include, and
all of your user customisable settings (if you have any) in another include
and finally another include for all your functions, so that any function is
aviable at anytime.
But this doesn
I'd go w/ functions. You can split the functions into as many files as
needed but I wouldn't embed their inclusions in a switch statement. I'm
not quite sure what you need the switch statement for so am assuming
it's part of your applications logic. I'd never write a program as one
giant clump
John,
part of this is a matter of taste - I would personally rather split this
into functions.
BUT: even if you _are_ using functions, you should only include() the
file with the function when you need it, IF this part of the code is
getting large. This way, php will not need to parse code that
11 matches
Mail list logo