View Single Post
  #167  
Old 06-29-2001, 01:44 PM
gmyachtsman gmyachtsman is offline
 
Join Date: Dec 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01273 seconds
  • Memory Usage 1,773KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete