Re: Safe way to get all variables
| From: | Jonatan Bagge | Date: | Mon, 25 Sep 2000 09:55:12 +0000 |
| Subject: | Re: Safe way to get all variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17454@lists.php.net to get a copy of this message | ||
just start your scripts with
<?php_track_vars
instead of
<? or <?php
Or am I wrong?
Joao Prado Maia wrote:
> On Fri, 15 Sep 2000, Cynic wrote:
>
> > You have misunderstood the concept.
> > When register_globals is set On, it means EGPCS (Environment,
> > Get, Post...) variables are extracted into the global scope:
> > $PHP_SELF, $action, $boo (from your querystring) etc. Otherwise,
> > you can only access them through $HTTP_*_VARS arrays, provided
> > <em>track_vars</em> is set on. As of 4.0.3-dev, track_vars is
> > <em>always</em> on.
> >
>
> Aha, so $HTTP_*_VARS arrays are only available when the track_vars
> directive is turned on. PHP 4.0.3 on CVS or whatever might have it always
> turned on, but what if an user turns it off, my script will not work at
> all if I expect a $HTTP_*_VARS variable on my code.
>
> I was asking just to make sure that I couldn't ever be sure if this
> variables will always be available to me. I guess I'll just have to use
> $QUERY_STRING or $REQUEST_URI and past it manually. That way I'm positive
> it will always work.
>
> I'm doing this to create a generic class by the way. I'm not _that_
> paranoid. In any case, thanks for that, I really did missunderstood the
> text on the manual.
>
> Regards,
> Joao
>
> --
> Joao Prado Maia
> Web Developer
> Kefta, Inc.
> T: (415) 391-6881 ext 8008
> F: (415) 391-7079
>
> Marketers: Check out http://www.kefta.com for your next risk
> free
> acquisition campaign!
>
> Sign up for a Keftamail account today: the free email that pays!
> http://www.keftamail.com/www/reg.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net