PHP Code isn't Working in my .html File

If your website requires advanced features than what HTML alone can offer, at some stage you may be required to use PHP. HTML and PHP are two different programming languages but they are designed to interact with each other in a single HTML page.

If you find that your PHP code is not working in your .html file, you may need to add the following line to your .htaccess file.

AddType application/x-httpd-php .html .htm

If you've never heard of a .htaccess before, it will be located in the root directory where your files are stored. You can use your favourite FTP program to connect to your account and edit this file, adding the quoted line shown above and saving the changes.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to log into cPanel

There are two different methods to log into your cPanel control panel in order to manage every...

What's the difference between Aliases, Addon and Subdomains?

### Aliases An Alias domain does not have a unique website. It is a domain that is masked to...

Creating a MySql Database

If your website uses PHP or you need to hold a collection of records which need to be accessed...

Importing a MySql Database

You can import a MySQL database via phpMyAdmin which is available in the cPanel control panel....

Exporting a MySql Database

You can export a MySQL database via phpMyAdmin, available in cPanel, if you want to keep a backup...