I've settled on .inc.php, .class.php, etc. that way you get the best of both
worlds. Your files are identified as what they are and don't get sent out
unparsed

Tim Ward
Internet Chess www.chessish.com <http://www.chessish.com> 


        ----------
        From:  Jason Wong [SMTP:[EMAIL PROTECTED]]
        Sent:  19 April 2002 09:28
        To:  [EMAIL PROTECTED]
        Subject:  Re: [PHP] .inc over .php

        On Friday 19 April 2002 16:10, Jacob Wyke wrote:
        > Just a few quick questions if anybody is out there.

        Nobody here but us chickens.

        > Why use .inc as a file extenstion when you can use .php ??

        Just a matter of aesthetics. Some people might like to use .inc to
remind 
        themselves that the file is to be included and not run on its own.

        > What are the advantages/disadvantages to using .inc?

        None from a technical point of view

        > Is one more secure?

        On default webserver settings, .inc may be less secure because by
default the 
        webserver would not treat .inc files as php files and thus return
them as-is. 
        Thus if people know the name of your "filename.inc" they could
potentially  
        browse to it and thus see its contents. 

        There are two ways to counter this:

        1) have the .inc files in a directory outside the scope of the
webserver 
        directory.

        2) set the webserver to treat .inc files as php files.

        > Which is faster?

        No difference.

        > Which is consider a better pratice?

        As long as you take the necessary precautions then it boils down to
a matter 
        of preference.

        -- 
        Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
        Open Source Software Systems Integrators
        * Web Design & Hosting * Internet & Intranet Applications
Development *

        /*
        "Home, Sweet Home" must surely have been written by a bachelor.
                        -- Samuel Butler
        */

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to