As a rule, all PHP scripts are processed by the interpreter only with the .php extension
If you want to execute PHP code in files with a different extension, for example, .html, you need to add this handler additionally.
This can be done using a special .htaccess file
If this file is missing, create it in the root of your site.
You can do this via FTP or through the file manager of the DirectAdmin hosting control panel.
To add an additional handler, you need to add the following code in the file:
|AddHandler application/x-lsphp74 .html .htm
Please note that with the lsphp74 entry you specify the PHP version that will process the extension data, you can specify a different version.
You can also specify multiple extensions at the same time, separated by a space.