NYCPHP Meetup

NYPHP.org

[nycphp-talk] Setting Constants Globally?

Malcolm, Gary gmalcolm at professionalcredit.com
Fri May 9 12:39:26 EDT 2003


I have a file with my system wide defines ( define( "THING", defintion); )
as an include on another file where i put my most common includes (like my
db classes).
I then will include the second file to avoid tons of includes in each
script.

defines are global within individual scripts.

works well for me...

I'm curious how others handle this seemingly common issue.

> -----Original Message-----
> From: Jim Musil [mailto:jmusil at villagevoice.com]
> Sent: Friday, 09 May, 2003 9:34 AM
> To: NYPHP Talk
> Subject: [nycphp-talk] Setting Constants Globally?
> 
> 
> 
> Hi,
> 
> Pardon me if the answer to this question is obvious, but is 
> there a way to
> define my own constants that are global for all php scripts?
> 
> I see that I could auto_prepend a file to every script, but I'm more
> interested in being able to set my own constant.
> 
> Something like PATH_TO_DEVTOOLS ...
> 
> Maybe there is a better way to do something like this?
> 
> 
> 
> Jim
> 
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030509/fe8ea02d/attachment.html>


More information about the talk mailing list