title: Having trouble getting php to work
body: <p>I am just starting in web development, and I am having trouble getting php to work. I have access to a domain on my universities' server that should have php installed, although I'm not entirely sure about that.</p>
  
  <p>This is the code I am trying to run.</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;p&gt;
  testing to see which scripting languages work
  &lt;/p&gt;
  &lt;?php
  echo "php works";
  ?&gt;
  &lt;script type="text/javascript"&gt;
  document.write("javascript works")
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I notice you are able to 'run' HTML and javascript code by opening the text file with a browser (I use Chrome). But when I view the page source inside the browser, the php is commented out. This same code is loaded onto my website the university provides, and the same thing happens there.</p>
  
  <p>I've looked around for how to solve this, I figured you need to have some sort of flag indicating the page runs php, but I can't find anything.</p>
  
  <p>Here is my webspace if it helps:
  Removed for privacy purposes</p>
  
  <p>Thanks everyone for the responses, I was able to get it to work by changing it to a php file.</p>