What I always do would probably fill both needs. My filenames usually look
like this:

URL Files - can be accessed directly through the browser
----------------------------------------
filename.php -> Normal PHP files

Non-URL Files - are hidden from the browser either by means of .htaccess or
by being moved outside of the root web directory
----------------------------------------
filename.inc.php -> PHP Include files (these are all files containing
content to be included in Normal files)
filename.class.php -> PHP Class files (these are my class files)
filename.lib.php -> PHP Library files (these are function libraries)

This allows PHPDoc to pick up the correct files as well as prevents people
from viewing the source code of my files. The only files that print content
directly to STDOUT are filename.php and filename.inc.php. The other two file
extensions, filename.class.php and filename.lib.php, only contain functions,
classes, variable declarations, etc.

--Toby

----- Original Message -----
From: "Johnson, Kirk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 6:22 PM
Subject: RE: [PHP] Please review our coding standards [ ideas ]


> Steve, I am wondering what your reason is for item 4.2. Security, or
> otherwise? Personally, I like having various file extensions, for sorting
> files by content type.
>
> Thanks for putting this up here.
>
> Kirk
>
> > -----Original Message-----
> > From: Steven Haryanto [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Please review our coding standards [ ideas ]
>
> > 4. File organization
> > --------------------
>
> > 4.2 All PHP libraries and include files, is named with '.php'
> > extension (ie.
> >      no '.lib', '.inc', etc.). Test scripts is named with
> > '.phpt' extension.
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to