{"id":56654,"date":"2023-09-11T13:16:52","date_gmt":"2023-09-11T10:16:52","guid":{"rendered":"https:\/\/tuthost.ua\/faq\/how-to-add-file-extensions-for-php-interpreter-to-process\/"},"modified":"2024-07-19T19:17:18","modified_gmt":"2024-07-19T16:17:18","slug":"how-to-add-file-extensions-for-php-interpreter-to-process","status":"publish","type":"ht_kb","link":"https:\/\/tuthost.ua\/en\/faq\/how-to-add-file-extensions-for-php-interpreter-to-process\/","title":{"rendered":"How to add file extensions for PHP interpreter to process?"},"content":{"rendered":"\n<p>As a rule, all PHP scripts are processed by the interpreter only with the .php extension<\/p>\n\n<p>If you want to execute PHP code in files with a different extension, for example, .html, you need to add this handler additionally.<\/p>\n\n<p>This can be done using a special .htaccess file<\/p>\n\n<p>If this file is missing, create it in the root of your site.<\/p>\n\n<p>You can do this via FTP or through the file manager of the DirectAdmin hosting control panel.<\/p>\n\n<p>To add an additional handler, you need to add the following code in the file:<\/p>\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><em>AddHandler application\/x-lsphp74 .html .htm<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n<p>Please note that with the lsphp74 entry you specify the PHP version that will process the extension data, you can specify a different version.<\/p>\n\n<p>You can also specify multiple extensions at the same time, separated by a space.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":13,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"ht-kb-category":[10702],"ht-kb-tag":[],"class_list":["post-56654","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-general-questions"],"taxonomy_info":{"ht_kb_category":[{"value":10702,"label":"General Questions"}]},"featured_image_src_large":[],"author_info":{"display_name":"\u0414\u0430\u0432\u0438\u0434","author_link":"https:\/\/tuthost.ua\/en\/author\/david-tuthost-com\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/56654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/comments?post=56654"}],"version-history":[{"count":2,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/56654\/revisions"}],"predecessor-version":[{"id":56661,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/56654\/revisions\/56661"}],"wp:attachment":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/media?parent=56654"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-category?post=56654"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=56654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}