What is 'index.phtml'

  • Thread starter Thread starter -
  • Start date Start date
from a google search
A PHTML (or it's sometimes called a PHP) page is a Web page that includes a script written in PHP,
.

It's the same as a SHTML page, most people will use .php but .phtml is another choice you have.
 
Upvote 0
:| What is the point of it being there I already have an index.php?

You got a script of some sort? It could be the script has both incase your server doesn't accept the .php end tags.

If I remember you need to allow the .php tags to be used on a server?
 
Upvote 0
If I remember you need to allow the .php tags to be used on a server?

Yes, if it's Apache it needs to be told with a 'DirectoryIndex' directive in its configuration as to which files could be the index for any directory. That could look like:

Code:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

Files will be searched for in that order and the first one found is served.

So to answer the original question it depends on the server configuration as to whether index.php or index phtml is served.

Are the two files actually the same?
 
Upvote 0
.PHTML are the web page that contains PHP code; parsed by a PHP engine on the Web server, which dynamically generates HTML; often used for database access, such as retrieving data from a MySQL database; can be run using Apache or Windows Server with the PHP engine installed.

Detailed information for file extension PHTML:

Primary association: Embedded Perl (ePerl) File
Mime type: application/x-httpd-eperl, text/html
 
Upvote 0

Latest Articles