U
U
uuuu2020-08-25 21:35:06
PHP
uuuu, 2020-08-25 21:35:06

How to execute PHP instead of displaying it as text?

There is a simple PHP code on an HTML page:

<?php
echo 'Hello';
?>

Instead of displaying Hello, the entire code is displayed.

Added line to .htaccess file
AddType application/x-httpd-php .php .htm .html .phtml

But all the same.

If you create a .php file, then everything works as it should (php is installed)
The site is hosted, PHP 7.0.33

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marshadow, 2020-08-25
@marshadow

Change file extension from .html to .php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question