...

View Full Version : Include .php file in a .htm file



mw2005
12-31-2005, 06:27 PM
Hi all,
Just started and i want to know if it is possible to include a php file in a .htm file and how would i do this?

Thanks in Advance,
Any help would be appreciated,

MW2005

Ramesiv
12-31-2005, 06:39 PM
i dont think its possible to include a .PHP file in a .HTML file, although it is possible to do it the other way around using the
include(...path to .HTML file...); function.

mw2005
12-31-2005, 06:43 PM
I Have this and i cannot seem to make it work

index.htm

<html>
<head></head>
<body>
TEXT
<?php include("http://localhost/log.php")?>
</body>
</html>

Ramesiv
12-31-2005, 06:54 PM
You are using a .html file for a .php file, unless you have set ur Apache server to parse .html files as .php files, it is impossible to use PHP code in a .html file.

mw2005
12-31-2005, 06:56 PM
Thanks for the speedy responce,
I will do that now,

MW2005



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum