Re: How to set register_globals=off in the script?
| From: | John Holmes | Date: | Tue, 21 Dec 2004 23:09:02 +0000 |
| Subject: | Re: How to set register_globals=off in the script? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-204893@lists.php.net to get a copy of this message | ||
> From: Jerry Swanson <pmysql@gmail.com>
> I know that "register_globals = on" is not secure.
bah... you can write secure scripts with it on or off. having it off by default simply helps to
lessen some of the security issues that new programmers may not be aware of.
> But one program
> requires to use register_globals=on. So in php.ini register_globals is
> set to on.
>
> I have PHP 5.1, is it possible in the code set register_globals=off
> for specific scripts.
>
> So I want to keep PHP register_globals=on in php.ini, but in local
> files set to off?
>
> How I can do this?
You can use an .htaccess file to turn it on or off for directories. I don't think it works for
individual scripts, though.
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html