0

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

2
  • 7
    Do not do this. Please. Commented Aug 16, 2011 at 16:38
  • @Andrew, you're right. He should use it to interact with COBOL. Commented Aug 16, 2011 at 16:45

1 Answer 1

3

There are a couple ways to interact with PHP. The easiest way to get started is to implement CGI in your program.

Wikipedia has a nice example.

Basically, you execute PHP-CGI.exe, and send/receive data over standard in/out.

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.