SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: extensions

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    extensions

    How can I add to the list of extensions that php will compile (.php, .php3)

    is it in php.ini?? I couldnt find it in there



    thank you

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Apache its in the httpd.conf file or a .htaccess file. In IIS its in the Home Directory > Configuration settings.



    In Apache look for a line like

    AddType application/x-httpd-php .php .phtml .php3

    or something similiar, thats what you need to add to and then restart apache. Or add one of those lines ot a .htaccess file which will add the extensions you specify on to the existing extensions that apache is setup to parse.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx.. I found it in httpd.conf

    never could find the .htaccess, where is it?

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An .htaccess file is something you create to handle directory level configuration options. So for instance if your httpd.conf file had

    AddType application/x-httpd-php .php .phtml .php3


    And you wanted to have on folder where .html files got parsed as PHP, so instead of adding .html to your httpd.conf file and making this site wide. You could use a .htaccess file. Create a file named .htaccess and stick in it nothing but one line.

    AddType application/x-httpd-php .html


    So now in addition to all pages with extensions listed in the httpd.conf file, any file with a .html extension in the folder where the .htaccess file is will be parsed as php as well.

    Does that help?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

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