I have two files: test.php and query.php.
My server is lighttpd.
In test.php I want to echo the response to query.php request.
It doesn’t work because Lighttpd is single threaded.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are truly trying to emulate a request to the page then you should either use something like CURL, or
file_get_contents. If you are just trying to run the code in query.php, then consider including/requiring query.php and making a function/method call.As a quick and dirty last option, you can always use an output buffer that captures the output of including query.php: