Msg#: 3041472 posted 5:11 pm on Aug 10, 2006 (gmt 0)
I'm doing the configuration of somebody else PHP script and i need to make SSI to run in the html tags that are in the PHP script. I've done a couple of tries and the SSI tags are just ignored, nothing happen?
Msg#: 3041472 posted 5:35 pm on Aug 10, 2006 (gmt 0)
You are probably encountering an issue with the filetypes the server is configured to allow standard SSI with. If you are within a PHP script, you should use PHP include syntax. Here is one example: <?php include "somefile.php"; ?>
Note that there are many SSI directives, and all of them have PHP alternatives.
Msg#: 3041472 posted 11:21 am on Aug 11, 2006 (gmt 0)
Well the: <?php include "somefile.php"; ?> Works fine but the problem is that the "somefile.php" is actually "somefile.cgi" and what i get is the full code of the Perl,like: #!/usr/bin/perluse strict;use CGI;use part2;use part3;.... ....the rest of the php document. Even calling the include function in the end of the php script it always come in the top of the page.
virtual() is similar in functionality to Apache's mod_include (SSI) <!--#include virtual="somescript.cgi" --> functionality. Likewise, PHP's include() is similar to a standard SSI file inclusion <!--#include file="somefile.html" -->. As I noted, all of the Apache mod_include (SSI) functions have a PHP alternative, it just depends on what you need.
Good work getting what you needed! ;)
[edited by: StupidScript at 5:12 pm (utc) on Aug. 11, 2006]