File extensions for PHP scripts, how to add your own extension


PHP interpreter automatically processes as PHP scripts files with the following extensions:



  • *.php

  • *.html


  • That is, filled with such extensions will be automatically processed by the web server like PHP scripts. For example, index.php or 123.html. The user can independently and their own extensions to process the corresponding files as PHP scripts by placing in the file.htaccess string of the form:


    AddType application/x-httpd-php .ext1 .php3 .html

    where text 1, php3 and .html are extensions to be added in the file names. For example, in this case, the files index.ext1, file.php3 and test.html .