To solve how to call the PHP parser, I want to be an HTTP server. the preceding parsing packets and static text HTML transmission are complete. I want to do the PHP function below. I used to only use java. I don't have any idea about php. I checked it and found a PHP parser, but how to implement calling in C program and passing parameters. The novice said that the system was not fully understood. please explain the ideas. ---- Solve how to call the PHP parser
I want to be an HTTP server. I want to parse the packets and transmit static text HTML. I want to do the PHP function below. I used to only use java. I don't have any idea about php. I checked it and found a PHP parser, but how to implement calling in C program and passing parameters. The novice said that the system was not fully understood. please explain the ideas.
------ Solution --------------------
I am not very clear why you want PHP. if you have implemented the HTTP service by yourself and then implemented PHP, why don't you need Apache?
It may be easier to talk about what problems you want to solve.
------ Solution --------------------
An implementation method
Use fastcgi protocol to implement php and http communication
The PHP-FPM is a php process manager that listens to Port 9000 by default
Your http needs to implement the fastcgi protocol by yourself.
Http://www.itcoder.me /? P = 250