I am having problems getting the last 10 to show up on my web page from my include file into the first page of my website harborsailing.com . I am hosted on an apache server at hostrocket.
I tried to include the last20.php file in a .shtml file, .shm file, and a .php file, all without complete success.
.htaccess
I was concerned that part of my problems could be due to .htaccess: I saw on a thread elsewhere that I could edit the .htaccess file to include the following:
AddType text/html .shtml .shtm .html .htm
AddHandler server-parsed .html .shtml .shtm .htm
and that maybe that would work for adding .php too.
See:
http://forums.hostrocket.com/showthr...light=htaccess
My past experience with .htaccess indicated to me that as soon as it is loaded onto the website by ftp, it disappears. But I was able to set my Leap ftp going to options-->preferences-->view to show hidden files.
I created a .htaccess file with the prescription above and put it in my public_html folder (there had been none there).
What I tried:
1. In .shmtl type files
When I used
<!--#include file="last10/last10.php"-->
or
<!--#include virtual="last10/last10.php"-->
(with or without a first "/") and
placed them in files with a .shtml ending I got unparsed included files showing up as raw php code.
With .stm I got a directory index and when I clicked on the index file, I got the same as above.
Incidentally, this is the same thing I get when I try to access to included page directly:
http://www.harborsailing.com/last10/last10.php
2. In .php type files
Then I tried changing my own main index file name to end in .php (the include was on the first page). And I tried this code:
<?php include("last10/last10.php"); ?>
But when I did that nothing showed up for the include (with or without a first "/").
I also tried including the full
http:// address with the same result of not showing up.
I tried putting the include in the header, in the body, and after the body. Did I need to call it? If so, maybe that is why I saw nothing.