need help with PHP on Apache
Posted: 2015/01/20 13:29:40
I'm sorry if I am an idiot for asking this question.
but I don't seem to be able to make php interpreter work on Centos7.
I've installed apache with yum install httpd
I've installed php with : yum install php php-devel
basic Apache is working well,
I create a VirtualHost wih a simple html and its working fine.
but when I add the php statement ( <?php echo ... ?>) only the html is showing, I done lots of research and it seems like it should be working.
here is my index.html, which is not showing or processing php code.
what can I do to fix this ? thank you
<!-- DOCTYPE html -->
<html lang='en'>
<head>
<meta charset="UTF-8" />
<title>
My First site
</title>
<link rel="stylesheet" type="text/css" HREF="main.css" />
</head>
<body>
<h1>
HTML Document Structure
</h1>
<p>
This is a simple HTML document.
<?php $var=1 ;
echo $var; ?>
</p>
</body>
</html>
but I don't seem to be able to make php interpreter work on Centos7.
I've installed apache with yum install httpd
I've installed php with : yum install php php-devel
basic Apache is working well,
I create a VirtualHost wih a simple html and its working fine.
but when I add the php statement ( <?php echo ... ?>) only the html is showing, I done lots of research and it seems like it should be working.
here is my index.html, which is not showing or processing php code.
what can I do to fix this ? thank you
<!-- DOCTYPE html -->
<html lang='en'>
<head>
<meta charset="UTF-8" />
<title>
My First site
</title>
<link rel="stylesheet" type="text/css" HREF="main.css" />
</head>
<body>
<h1>
HTML Document Structure
</h1>
<p>
This is a simple HTML document.
<?php $var=1 ;
echo $var; ?>
</p>
</body>
</html>