Re: Looking for an informed opinion
| From: | Gonzalo Casas | Date: | Tue, 28 Nov 2000 18:05:18 +0000 |
| Subject: | Re: Looking for an informed opinion | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27643@lists.php.net to get a copy of this message | ||
> 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.
>
or... change the extensions, and use *.php for your includes....
Gonzalo