PDA

View Full Version : Include a PHP onto a .shtml page?



<|R0cKm@nX|>
April 30th, 2001, 20:37
Is there a way for mi to include PHP stuff(poll, forum) onto a .shtml page like a perl(using SSI)?
If not, how do I include a PHP stuff and Perl stuff onto a .PHP page?

bigperm
May 1st, 2001, 12:05
<?php include="whatever.*" ?> That works for text, I don't know if it's the same for cgi. Somebody else will know.

But you won't be able to call php through shtml, or vice versa.

<|R0cKm@nX|>
May 2nd, 2001, 10:14
how about a php on to .php page?

lucifer
May 2nd, 2001, 11:08
anything in <?php ?> is php code and executed
<? ?> if you have short tags enabled

else the page is just html

include "myfile.php"; includes another php file

Koolguy
May 2nd, 2001, 20:41
<?include('http://www.server.com/file.php");?>
<?virtual('file.pl");?>
<?require('file.php");?>

Zapdos
May 6th, 2001, 10:02
Can i include a htm file to a php script? If yes, how?

lucifer
May 6th, 2001, 10:51
<?php include "myfile.html"; ?>

Lord MJ
May 19th, 2001, 16:07
Simply using an regular virtual SSI tag should work. However on some servers a .phtml extension is required to include PHP.