title: Calling a PHP script from a C++ Program
body: <p>I'm attempting to call a PHP script from a C++ program. For instance, here is an example C++ program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  
  using namespace std; 
  
  int main() {
  
  cout &lt;&lt; std::system("test.php");
  
  return 0;
  }
  </code></pre>
  
  <p>This program is calling some script "test.php" which might be structured like this:</p>
  
  <pre><code>&lt;?php
  echo "Hello";
  ?&gt;
  </code></pre>
  
  <p>When running the C++ code, I get the following:</p>
  
  <pre><code>sh: 1: test.php: not found.
  </code></pre>
  
  <p>Now the obvious thing to check is if the files are in the same directory (they indeed are), however the error still persists. Any feedback on how I might go about doing something like this?</p>
  
  <p>Thanks.</p>