I am writing a Java web server, and now I can process .HTML files normally, but it is difficult for me to understand how to process .PHP files that require $ _POST and $ _GET.
How do web servers typically populate these arrays? It is impossible to fill them using the command line from what I can say, since I initially thought about passing stdout exec ("php whatever.php some $ _get args), but this is not possible without physically changing the php code to explode args and filling them in $ _GET, which I do not want to do - I want to do it the way the web servers do.
Does anyone have any suggestions on how web servers do such things?
source share