title: echo command show all code of the php file
body: <p>I am learning php, and get these file to change, but the echo command rather than show only the string, shows the entire code of the file.</p>
  
  <p>I am using linux ubuntu and apache2.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style type="text/css"&gt;
  .tg  {border-collapse:collapse;border-spacing:0;margin:0px auto;}
  .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
  .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
  .tg .tg-0lax{text-align:left;vertical-align:top}
  @media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;margin: auto 0px;}}&lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Welcome to our awesome gallery!&lt;/br&gt;
  See recent uploaded pictures from our community, and feel free to rate or comment&lt;/br&gt;
  &lt;?php
  require '/var/www/html/lib.php';
  $path = '/var/www/html/uploads/';
  $ignored = array('.', '..', 'index.html');
  $files = array();
  
  $i = 1;
  echo "&lt;div class='tg-wrap'&gt;&lt;table class='tg'&gt;"."\n";
  
  foreach (scandir($path) as $file) {
    if (in_array($file, $ignored)) continue;
    $files[$file] = filemtime($path. '/' . $file);
  }
  arsort($files);
  $files = array_keys($files);
  
  foreach ($files as $key =&gt; $value) {
    $exploded  = explode('.',$value);
    $prefix = str_replace('_','.',$exploded[0]);
    $check = check_ip($prefix,$value);
    if (!($check[0])) {
      continue;
    }
  -- snip --
  [...]
  ?&gt;
  &lt;/table&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Rather than get just the strings on echo, i get the php code:</p>
  
  <p>look the image --> <a href="https://imgur.com/gallery/GCqUgQh" rel="nofollow noreferrer">https://imgur.com/gallery/GCqUgQh</a></p>