Is it possible to use Node.js as a server for PHP?

Asked

Viewed 345 times

0

I am interested to know if I could use Node.js as a server for PHP. If so, how could I do that? Would it be a problem to use it?

  • 2

    In principle it would be enough to use the exec() calling PHP, the bigger question would be "if you need PHP, why use Node?" and vice versa. Depending on the answer, the ways to resolve them may vary. https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

  • in google, "nodejs as php server"

  • The @Bacco comment/question makes a lot of sense. You can also run PHP and Node on the same server without one being dependent on the other. But as mentioned, it is not customary to need both.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.