Go Back   Website Hosting - VPS Hosting - Domain Registration Ireland :: Blacknight > Technical Support > Shared Linux / Windows Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 16-12-08, 07:34 PM
Junior Member
 
Join Date: Jan 2007
Posts: 12
Default php includes

I'm on the linux plan
With my old host I've been using php includes like this
Code:
<?php include ("http://www.mysite.ie/common/t_header.htm"); ?>
and a .htaccess like this in the root directory
Code:
Action application/x-php /cgi-bin/php
AddHandler application/x-php .html .htm
to put a header on each page.

This wont work for me now, Do I need to switch something on in the control panel?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 16-12-08, 08:24 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

You might need to look at the handlers in the web config for your php in .html files (not sure if it will work, but that's where I'd look)

As for the includes ... why are you using the full domain name and not a relative path?
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18-12-08, 01:48 PM
Junior Member
 
Join Date: Jan 2007
Posts: 12
Default

Sorry, I'll phrase my question differently.

I'm using the Medius Hosting plan (Linux) How can I use a php include call a header to pages on my site?

If you can tell me what to put in the .htaccess file and show me code to use in the actual include that would be great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 19-12-08, 10:52 PM
Administrator
Site Admin
 
Join Date: Aug 2003
Posts: 182
Default

you don't need to use include("http://www.mysite.ie/blah/lah");

It should be include ("common/t_header.html") ;

You give relative paths to the files, not including http urls.

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 20-12-08, 06:25 PM
Junior Member
 
Join Date: Jan 2007
Posts: 12
Default

Ok, but the minute I put a .htaccess file with
Code:
Action application/x-php /cgi-bin/php
AddHandler application/x-php .html .htm
in the root directory I get a 404 Error for the home page
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 20-12-08, 10:13 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

Quote:
Originally Posted by JamesA View Post
Ok, but the minute I put a .htaccess file with
Code:
Action application/x-php /cgi-bin/php
AddHandler application/x-php .html .htm
in the root directory I get a 404 Error for the home page
You should add the handlers via the control panel not in a .htaccess

Login to your control panel and in the "website configuration" section choose the "advanced" tab. You can add extra handlers there
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
includes, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:52 PM.


VPS Hosting Web Hosting Ireland Blacknight Blog Blacknight Status

Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2010, Jelsoft Enterprises Limited.

SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17