title: Print output from .out file in a PHP page
body: <p>I'm having a hard time putting the output from an executable on my web server into a web page. I'm hoping to get a simple "Hello World" going. </p>
  
  <p>Specifically, I have a very basic C program that prints "Hello World". I've compiled it using gcc, which produces HelloWorld.out, which I can run from the command line. </p>
  
  <p>I then have a basic index.php file, in which I am attempting to use passthru() to output the result of the C program into the web page. The .php file looks like:</p>
  
  <p><code>&lt;?php passthru('HelloWorld.out'); ?&gt;</code></p>
  
  <p>I've uploaded both the php and the .out file to the same directory on my server. However, index.php produces no output. I've looked around online and there's a few places I may be getting this wrong... My general goal is to be able to embed the output from an executable program on my web server into the page (doesn't need to be HelloWorld.out; possibly the .out extension doesn't work on the server?). Or I may be using passthru() incorrectly; as I understand this is the most barebones was to use it. </p>
  
  <p>Thanks! </p>