html - `Index.php` file Showing Code and not Rendering a Website -


i don't know how explain well, i'm sure pretty dumb.. first of all, i'm using netbeans in linux. trying write simple website links , menu. menu i'm using variables know page include. want include php needed insert php code in html file. red need change filename index.php server recognize php commands.. changed file extension php , see code of website , not website itself..

this index.php:

<!doctype html> <html>     <head>         <meta charset="utf-8">         <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1">         <meta name="description" content="">         <meta name="viewport" content="width=device-width">         <title>ishimoto - cars life</title>         <link rel="stylesheet" href="css/normalize.css">         <link rel="stylesheet" href="css/main.css">         <script src="js/vendor/modernizr-2.6.2.min.js"></script>     </head>     <body>         <div id="allwebsite">             <div id="menu">                 <div id="logo">                     <a href="?nav=index"><img src="img/logo.jpg" width="450" alt="logo"/></a>                 </div>             </div>             <div id="content">                 <?php                     echo $_get['nav'];                 ?>             </div>         </div>     </body> </html> 

i configured apache , php running fine if run outside netbeans, when run project netbeans, still source code. running through:

http://localhost:8383/ishimoto/index.php 

any thought?

my problem 2 problems. first of apache wasn't installed correctly re installed it: sudo apt-get install apache2 , re installed php5: sudo apt-get install php5 libapache2-mod-php5. after had move project /var/www/ folder , work on that. , thats it! all!


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -