Reputation: 604
I'm currently writing an http server in C# and I'm planning on allowing it to use PHP. How does PHP work? Like, the compiler or whatever it uses. I was thinking it takes php files in input and outputs the html or whatever file for the http server to give to the user's request. Is it possible to call on the php compiler or whatever with the file requested by the user? Please tell me if I'm thinking about this the wrong way.
Thanks
Upvotes: 0
Views: 2028
Reputation: 163232
There are a couple ways to interact with PHP. The easiest way to get started is to implement CGI in your program.
Basically, you execute PHP-CGI.exe, and send/receive data over standard in/out.
Upvotes: 3