That's because the server is usually configured to run PHP only for files with the .php extension. If you want to run your HTML files as PHP, you can tell the server to run your .html files as PHP files, but it's a much better idea to put your mix
This will, however, affect the HTML Code Coloring option in most HTML/PHP editors, which allows for easy understanding of the role of HTML tags. You should escape each double quote within the HTML code with a backslash. PHP in HTML - file extensions. When
If you are creating a new file anyway, you may as well use .php, but the way to execute PHP on a .html page is to modify the .htaccess file. This file may be hidden, so depending upon your FTP program, you may have to modify some settings to see it. Then
Post a Comment:
Showing 0 Comments: