[thelist] SSI and PHP mutually exclusive?

Kevin p+evolt at redbrick.dcu.ie
Sat Mar 16 07:24:00 CST 2002


Well you can simply execute the PHP script as a cgi.


e.g.
have the code:
<!--#exec cgi="my.cgi"-->
in your html or .shtml page (whichever is parsed for SSIs)

That will run my.cgi and output it.


Then, in my.cgi just put the path to php at the top and code as normal.

#!/usr/local/bin/php

<?

My PHP Code. (:

?>



There will be some differences with Environment Variables etc...
but unless you're doing something exceptionally complicated that should work.

If you have any problems just yell.
(:

- Kevin



More information about the thelist mailing list