Re: #exec and php together

From: Date: Tue, 03 Jul 2001 18:01:42 +0000
Subject: Re: #exec and php together
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56031@lists.php.net to get a copy of this message
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" <ciraci@nautica.it> To: <php-general@lists.php.net> 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 webmaster@nautica.it > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#56031) next »