Will.Spencer
Aug 25th 2004, 1:52 am
I have a site which is built using .shtml. I do not want to convert the entire site to PHP.
That being said, I do want to use some PHP, and I am having a wee bit of trouble.
I have a page, How do I find the Page Rank for my site? (http://www.internet-search-engines-faq.com/find-pr-page-rank.shtml) which calls a PHP file Check Google Page Rank (http://www.internet-search-engines-faq.com/page-rank.php?url=http://www.google.com).
The PHP script completely ignores the .shtml include directives, such as:
<!--#include virtual="header.shtml" -->
When I use PHP includes, the data is included, but the formatting is horribly mangled:
include('header.shtml');
When I change the file extension from .php to .shtml, the script displays instead of executing.
I've tried lots of tweaking with Apache's httpd.conf file, but I am just not getting it right.
httpd.conf has these lines in it currently:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .shtml
I removed these lines, because they caused all PHP to be displayed instead of executed:
AddType text/html .php
AddHandler server-parsed .php
Everything works right if I copy the contents of the include files into the PHP file manually. That is a very bad solution, however, because the include files change constantly.
Anyone seen/done this before?
What am I missing? :confused:
That being said, I do want to use some PHP, and I am having a wee bit of trouble.
I have a page, How do I find the Page Rank for my site? (http://www.internet-search-engines-faq.com/find-pr-page-rank.shtml) which calls a PHP file Check Google Page Rank (http://www.internet-search-engines-faq.com/page-rank.php?url=http://www.google.com).
The PHP script completely ignores the .shtml include directives, such as:
<!--#include virtual="header.shtml" -->
When I use PHP includes, the data is included, but the formatting is horribly mangled:
include('header.shtml');
When I change the file extension from .php to .shtml, the script displays instead of executing.
I've tried lots of tweaking with Apache's httpd.conf file, but I am just not getting it right.
httpd.conf has these lines in it currently:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .shtml
I removed these lines, because they caused all PHP to be displayed instead of executed:
AddType text/html .php
AddHandler server-parsed .php
Everything works right if I copy the contents of the include files into the PHP file manually. That is a very bad solution, however, because the include files change constantly.
Anyone seen/done this before?
What am I missing? :confused: