PDA

View Full Version : PHP, SSIs, CGIs oh my!


Shalazar
02-02-2000, 02:06 AM
If you utilize a lot of cgi scripts, server-side includes, etc. in your standard HTML pages, is it also possible to use those same apps in a PHP based page?[nbsp][nbsp]Or do you have to rewrite all the apps in PHP and have them embedded in the page?

I ask this because currently, the pages I'm interested in converting use SSI-based polling scripts, counters, headers & footers, mailing lists, and so on. All are Perl CGI scripts.

If I wanted to convert everything over to php, which would allow databasing of the massive photo gallery (an excellent advantage) and dynamic presentation of content on the main pages, what would have to happen to these valuable programs?

pier
02-02-2000, 03:55 AM
A quick response:

includes can be done with
[nbsp][nbsp]virtual("/cgi-bin/fulllist.pl")
or
[nbsp][nbsp]include("header.php3") or INCLUDE "header.php3"
or
[nbsp][nbsp]require("basictxt.txt")

Virtual does an extra call, but as you want to include the
output of the cgi-script, this has to be done this way.

include (or INCLUDE) just includes the whole file everytime an include is given, and parses it afterwards, but depending on the source, e.g. in if-statements.

require includes it anyway, so do not use require's in
conditional statements.

H.T.H.,
[nbsp]Pier
[ http://www.php.net is a good source in case you need to know more ]