NYCPHP Meetup

NYPHP.org

[nycphp-talk] Differences btw include and require ?

Brian Pang bpang at bpang.com
Fri May 9 10:29:48 EDT 2003


I would always use _once unless I specifically need to repeat something...

good point about continuing processing on a not found error.. but why
would I try to include/require a file that doesn't exist? :)


> include_once... solves 2 scripts calling the same include
> 	plus you can keep processing on a fail for a cleaner error 
> 
> > -----Original Message-----
> > From: Brian Pang [mailto:bpang at bpang.com]
> > Sent: Friday, 09 May, 2003 7:21 AM
> > To: NYPHP Talk
> > Subject: Re: [nycphp-talk] Differences btw include and require ?
> > 
> > 
> > I use require when I'm just calling in function libraries and includes
> > like a server-side include.
> > 
> > But otherwise, they do seem to behave similarily, don't they..
> > 
> > 
> > > What are the differences?  Personally, I always use include_once().
> > > 
> > > Thank you.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 
> 
> 






More information about the talk mailing list