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

  • *.php
  • *.phtml

That is, files with such extensions will be automatically processed by the web server as PHP scripts. For example, index.php or 123.phtml. The user can independently add their own extensions to process the corresponding files as PHP scripts by placing a line like this in the .htaccess file:

AddType application/x-httpd-php .ext1 .php3 .html
where ext1, php3 and .html are the extensions to be added to the file names. For example, in this case, the files index.ext1, file.php3 and test.html will be considered PHP scripts.

Was this answer helpful? 30 Users Found This Useful (148 Votes)