Re: good practice
| From: | Peter J. Schoenster | Date: | Fri, 15 Feb 2002 04:29:09 +0000 |
| Subject: | Re: good practice | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84859@lists.php.net to get a copy of this message | ||
On 14 Feb 2002, at 16:26, J Smith wrote:
>
> Using "global" in the global scope (i.e. "global $Config;") does
> nothing. If something is declared in the global scope of a file and
> then included into another file, it's still global. You don't need to
> actually say "global $whatever" unless you're in a function.
Thanks. I've been coding and learning, coding and learning.
> Also, if you're including a file named "CONFIG.inc" from the same
> directory as the script itself, please, please tell me you have your
> web server set up not to serve CONFIG.inc to the outside world. (i.e.
> you have a .htaccess file or something to send DENY to a request for
> CONFIG.inc or something.) Otherwise somebody could just grab
> http://example.com/CONFIG.inc and see it's contents
> without
> restriction.
Guilty as charged. Not that CONFIG.inc has anything of value in it
but nonetheless I've just made it off limits.
Peter
http://www.readbrazil.com/
Answering Your Questions About Brazil