Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

The Difference Between Index.html & Index.php

12

    HTML

    • All Web pages are delivered to Web browsers in a format called the Hypertext Markup Language. This is because all Web browsers are HTML readers, or viewers. They are not able to display files written in any other format, and they cannot execute program code. The only way a different format or file can be shown in a browser is if it is embedded in an HTML document. HTML files either have the HTML or HTM file extension.

    PHP

    • PHP is a programming language that is frequently used to write Web pages. HTML does not have any programming constructs, so PHP is one solution to allow the creation of Web pages that can be adapted according to the parameters given to it when the program is called. Web servers know to run a file as a PHP program if that file has the PHP file extension.

    Purpose

    • An index file is the name for a file containing a default Web page. An address for a Web page is called a Uniform Resource Locator. The URL contains the site name, the directory path to a file and the file containing the desired Web page. However, the file name can be left off. If a Web server receives a request for an address the leads to a directory and not a file, it will look for a file called index. Both index.html and index.php are names for default files.

    Precedence

    • If no file name is given, the Web server will look for a default file in the directory. It works through a list of default file names until it finds a file with that name. The standard precedence of default file names varies between server software. Also the website administrator can alter the order of precedence. Generally, however, the order of precedence in the base name of the file is “default,” “index,” “home” and “welcome.” So if a directory has a default.html and an index.html, the server will deliver the default.html file for any request missing the file name. Within each base name, there is another order of precedence according to the file extension. Again, this order can be altered by the website administrator. Servers based on the Windows operating system will look for the index.html file before the index.php file. Linux-based servers look for index.php before index.html.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.