Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Global constant definition

1 view
Skip to first unread message

Josep M. Gorro

unread,
Sep 5, 2003, 4:16:20 AM9/5/03
to
Hi all,
I would to know if is it possible to define constants on PHP.INI file
to avoid to create a general file (included on each PHP script) to know
it's value.

Thanks a lot.

Erwin Moller

unread,
Sep 5, 2003, 5:58:32 AM9/5/03
to
Josep M. Gorro wrote:

Yes and no, check the function ini_get() in the manual.
It reads variables set in your php.ini-file, but as far as I know they are
NOT globals.

I must say it is not a very nice thing to do.
All others on the same machine will receive your extra values too.

I would advise you to go for the include-option. How much work will that
be?? It is much cleaner. :-)

Regards,
Erwin

0 new messages