I am trying to add part of my own PHP to an almost unreadable template file in a forum system. I know that everything works fine, like server configuration, etc., but PHP just doesn't parse this page. JS works great. Any ideas? This is a simple .html page.
Try adding this to your .htaccess (or create a new one in the appropriate directory):
AddType application/x-httpd-php .php .html
Is it possible that the template file is read into a variable and not included or required? For instance. is it loaded using file_get_contents or something similar?
, eval() , file_get_contents PHP-, , . , . , , , .
Many template systems use their own encoding syntax. If so, it will not be possible to add PHP code to your template without opening many security holes.
Try to study the template language used or find out where you should place the code without changing the template file (a controller or plug-in system can be created for such material).
Your page should be a .php page.
Source: https://habr.com/ru/post/1777607/More articles:Отправка данных через NamedPipe при отключении сервера - c#How to get MySQL to exit TRADITIONAL mode? - mysqljquery onchange event for switch now instantly - jqueryRounded corners in the management of GroupBox - .netdjango delete source files and generate pyc files - pythonHow to separate letters and numbers from a string in JavaScript - javascriptJavascript question: variable definition - javascriptHow to specify the command line when using a support? - javaMaintaining a project using plugins in git - gitallocating memory with calloc and freeing it - cAll Articles