Re: Looking for an informed opinion
| From: | lee at server dot mediawaveonline dot com | Date: | Wed, 29 Nov 2000 10:02:03 +0000 |
| Subject: | Re: Looking for an informed opinion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27642@lists.php.net to get a copy of this message | ||
Accually Ive setup in httpd.conf for apache that apache should consider
all .inc files as .php files. If someone typed my inc file in the url bar
apache would try to parse it... because I almost allways only put
functions in my include files, and never output anything to the screen,
parsing it would do nothing.
But you do have a good point, people do have to take this into
consideration when setting up their httpd.conf file.
Chris Lee
Mediawaveonline.com
On Tue, 28 Nov 2000, Robert B. Easter wrote:
> On Monday 27 November 2000 21:31, Chris Lee wrote:
> > This is a big personal opinion about programming, everyone is different,
> > but I also like to keep my php code less than 1000 lines. The total code
> > executed may be much more because of included files. I personally find it
> > hard to keep track of more then 1000 lines at a time, if I split it up
> > its alot easier. Just try and break up your code logically, don't have
> > one include that does everything, I like to try an only put function's in
> > include (not allways, but most often)
> >
> > include_once("$DOCUMENT_ROOT/include/session.inc");
> > include_once("$DOCUMENT_ROOT/include/database.inc");
> > include_once("$DOCUMENT_ROOT/include/time_date.inc");
>
> I notice your *.inc files are possibly accessible via the web since they are
> under $DOCUMENT_ROOT. People can see how you coded them. Maybe you don't
> care. If you do care, then you'll want to have it go back one directory or
> to some other directory that is outside $DOCUMENT_ROOT where the webserver
> can't serve them out in plain view.
>
>