First question is why not just use PHP for both parts? i.e.
<?php
include(hello.php)
?>
I'd guess the reason your second example doesn't work is because PHP isn't
being called to parse the page. even though you're calling a php page with
your SSI, the destination page is named *.htm meaning that PHP won't be
involved.
So, I'd say you're going to need to rename the file to *.php in order to get
it to work. (or change your file associations so .htm is associated with
the PHP cgi.
--kurt
----- Original Message -----
From: "Paolo Ciraci" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 10:16 AM
Subject: [PHP] #exec and php together
> I'm trying to include the output of a php script into a standard html
> file via SSI #exec.
>
> The following is a sample php file (hello.php):
>
> <?php
> echo "Hello World!\n";
> ?>
>
> and the following is the sample html file (hello.htm):
>
> <HTML>
> <BODY>
> <!--#exec cgi="hello.php" -->
> </BODY>
> </HTML>
>
> both files are in the same directory.
>
> If I issue http://www.mysite.com/hello.php
> the script works well and I obtain the page showing the message
> "Hello World!"
>
> but if I try http://www.mysite.com/hello.htm
> I obtain an empty page.
>
> My system is BSDI 4.1 + Apache 1.3.11 + PHP 4.0.3pl1 (both module and
> cgi version) but I've tested the same example on a Window NT 4 +
> Apache 1.3.12 + PHP 4.0.3pl1 (cgi version) without success.
>
> Any idea, suggestion ?
>
> Thanks.
>
>
> Dr. Paolo Ciraci
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Responsabile Sistemi Informativi [EMAIL PROTECTED]
> Nautica Editrice S.r.l. http://www.nautica.it
> Via Tevere 44, Roma - tel 06 8413060
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]