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? which calls a PHP file Check Google Page Rank. The PHP script completely ignores the .shtml include directives, such as: <!--#include virtual="header.shtml" --> Code (markup): When I use PHP includes, the data is included, but the formatting is horribly mangled: include('header.shtml'); Code (markup): 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 Code (markup): I removed these lines, because they caused all PHP to be displayed instead of executed: AddType text/html .php AddHandler server-parsed .php Code (markup): 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?
Ahh... Owlcroft... that was just exactly what I needed. I modified the .shtml to include not one but four PHP sections, so that each .shtml include was called from exactly the right <div> section. Now all of the text and graphics appear in the correct places, even if the code does look a bit odd.
Hi, I am working on a school website, and I have the similar problem. However, from the replies posted, I don't really understand what is the solution. Can someone help me? ^_^ Basically, I have a site built in shtml with a virtual include files for the drop down menu on each page <!--#include virtual="/menu-only.htm" --> However, the 2 areas (calendar and search) which use php doesn't seem to display the drop down menu/navigation in IE. regular page: http://www.sabrinaliao.com calendar page: http://sabrinaliao.com/calendar/index.php (when using IE, the top navigation will not show) So how should I work around with this? Can anyone help?!!! Really appreciate for your assistance. - Sabrina
I see the menu system just fine with my browser, i don't use IE though. PHP is a server side scripting language that simply generates a mix of html, css and client side scripting code. If you see the drop down in one bowser and not in the other then the problem is not PHP related. Check you html output and verify syntax. Make sure that all of your tables and divs are formated properly.
Yes. There is no difference as far as the search engines are concerned. Yes. Use PHP as it will allow you to add more functionality later on if you so desire. __________________