Log In · Register

 
damn php includes.., May the rotttt
technicolour
post Mar 23 2006, 06:33 PM
Post #1


show me a garden thats bursting to life
********

Group: Staff Alumni
Posts: 12,303
Joined: Mar 2005
Member No: 115,987



K, I got rehosted, and I honest to God can not get my stupid php includes to work.

My OLD include was:

QUOTE
<?include ("http://elegance.foreverbliss.org/header.php"); ?>


Which calls for my OLD HEADER, which was:

QUOTE
<?php require('/home2/asweetap/public_html/elegance/wordpress/wp-blog-header.php'); ?>
<?php get_header(); ?>


My host tried changing it to:

QUOTE
<?include ("/home/.festus/classique/classique.impersonal.tv/header.php"); ?>


But, that doesn't work either.

I just need some gosh darn php help. Completely.
 
 
Start new topic
Replies
*mipadi*
post Mar 24 2006, 09:08 AM
Post #2





Guest






Use relative links. For example, if the file exists in the same directory, just use:
CODE
<?php include('header.php'); ?>
.

Or specify it relative to the webserver by placing a / in the front. For example, if the include exists at http://www.blah.com/includes/header.php, include it like this:
CODE
<?php include('/includes/header.php'); ?>
.

(As a tiny, minor side note, if your path doesn't contain a PHP variable, it's more efficient to use single quotes rather than double quotes.)
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: