Forum Moderators: phranque
Conclusion - calling a PHP script via an SSI directive and expecting to have access to the SHTML page from which it was called in PHP is not feasible.
I have found a work around - call the script from the browser after the page has been loaded. This works, but at a price - one extra round trip to the server.
<!--#include virtual="/cgi-local/print_schedule.pl?called_from=${REQUEST_URI}" -->
Jim
Conclusion - calling a PHP script via an SSI directive and expecting to have access to the SHTML page from which it was called in PHP is not feasible.
Invalid conclusion ;)
If you dump the PHP superglobal $_SERVER array in the PHP script which is the target of your SSI then you should see the REQUEST_URI index in there and it will contain the exact same thing as the variable being passed in your GET request via the SSI invocation (if the document containing the SSI is the same as that URI being requested).