Answer the question
In order to leave comments, you need to log in
Why is PHP code opening in the browser?
Ubuntu 16.04
Apache2
PHP7.0
Created an index.html file in /var/www/test.local folder and stuffed it with the following:
<?php
$site = "localhost";
$user = "root"; // login
$pass = "123"; // password
$name = "test"; // database name
......
?>
Created test.local.conf in /etc/apache2/sites-enabled and registered all paths and passwords I write test.local
in the browser and get the contents of my document. Where to run and what to do?
If .html is changed to .php then just a "white screen"
Answer the question
In order to leave comments, you need to log in
If you have PHP installed and when you rename index.html to index.php you get a white screen, then some error has been fixed in PHP.
You need to look at the PHP log.
Where to run and what to do?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question