1

PHP 5.4 has the built-in server (php -S localhost:8080). I'd like to be able to "create_server" (or similar, clearly don't know the function name) from within a PHP script (and without resolving to system, system_exec, exec, or backticks), but I don't see that in the documentation. Is this possible?

10
  • 2
    By "call this", what do you mean exactly? Start up an instance of it? Note that the built-in web server is really only designed for testing and demonstration purposes. Commented Mar 4, 2014 at 13:11
  • 1
    How exactly do you intend to run php script anyway, if your php server is not up and running? Commented Mar 4, 2014 at 13:12
  • Perhaps you're looking for this? stackoverflow.com/questions/8377178/… Commented Mar 4, 2014 at 13:12
  • 1
    I have only one question - why? (answering this question may help to understand original issue and resolve it in proper way). Or is it just curiosity? Commented Mar 4, 2014 at 13:27
  • @AlmaDo I'd like to be able to run the server within another process. I'd like the other process to be written in PHP. Commented Mar 4, 2014 at 15:41

1 Answer 1

1

Barring an actual trip through PHP's C source, the answer to this question seems to be "There is no way to accomplish this"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.