Re: Looking for an informed opinion

From: Date: Wed, 29 Nov 2000 11:00:44 +0000
Subject: Re: Looking for an informed opinion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27661@lists.php.net to get a copy of this message
I accually have three extensions, I like to keep things seperated. filename.php filename.egn whatever.inc .php is basic code, no more then the html guys can understand. .egn is the backend code for the .php file .inc is any standardizes functions I've made. Chris Lee Mediawaveonline.com On Tue, 28 Nov 2000, Gonzalo Casas 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. > > > > or... change the extensions, and use *.php for your includes.... > > Gonzalo > >

« previous php.general (#27661) next »