title: Getting a Python server to execute a script
body: <p>I'm pretty new to web development, so bear with me if these questions seem pretty fundamental. </p>
  
  <p>My use-case is as follows: I am hosting a server using <strong>ngrok</strong> which allows me to allow clients to securely tunnel to a server I host locally, using a public http(s) URL that ngrok generates. </p>
  
  <p>Currently the server I am running locally is the simplest possible python web server (I literally just invoke <code>'python -m SimpleHTTPServer 8080'</code>). </p>
  
  <p>Let's say I have a file "<em>simplescript</em>" located in the local directory where I instantiate the Python server. I would like to put in php code in "<em>simplescript</em>" so that when somebody fetches the file by using the browser to access <strong>"<a href="https://ngrokURL.ngrok.io/simplescript" rel="nofollow">https://ngrokURL.ngrok.io/simplescript</a>"</strong>, then my server will execute the php code in the script directly and return the return value (if one is generated) to the client requesting my file. </p>
  
  <p>Right now, when I try to do this, the client accessing my file only receives the actual text content of the script, and so it seems that the script is not being executed at all. </p>
  
  <p><strong>Question:</strong></p>
  
  <ul>
  <li>Is my use-case something that can be achieved using the Python simple HTTPserver, or do I need other tools?</li>
  <li>How can I make my scripts executable for my server (if that is something I have to do)? </li>
  </ul>
  
  <p>Thanks for the help!</p>