Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2003
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    extentions - how .php/.php3 different?

    Does ending files with .php or .php3 make any difference? For instance, are there some things or functions that a file.php cannot perform cuz its not file.php3?
    thanks.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,073
    Thanks
    11
    Thanked 98 Times in 96 Posts
    it depends on the server configuration and php version , file extensions need not reflect php versions which is confusing I know...

    If a server has php4.2.3 installed and is configured to pass *.php,*.php4,*.php3 to the PHP interpreter then they will all be passed to php4.2.3 for parsing so in that case there is no difference in functionality between php,php3 or php4 files.
    its perfectly possible to have *.yaks, *.gribble etc parsed via PHP (or whatever)

    It's possible though this would be the exception rather than the rule....to have 2 versions of PHP running on the same server (one as an SAPI module and 1 as a CGI) , in that case it may be that the extensions offer different functionality, again this is hardly standard.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    What really surprises me is that I haven't seen a lot of people setting up their own custom extensions for their sites. Occasionally I see a site that does it but not very often.

    Hey mabe I should name all my pages index.feyd or index.spooks or index.britneyspears
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How do you set file extensions to be parsed?

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,073
    Thanks
    11
    Thanked 98 Times in 96 Posts
    .htaccess (if allowed) or httpd.conf if you have access...

    AddType application/x-httpd-php .yak .llama .wombat

    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #6
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yeah...

    I do have .htaccess, so I will use that.

    I was thinking PHP.ini, but yeah, I remember now.

    Cheers firepages


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •