Log In · Register

 
 
Closed TopicStart new topic
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.
 
freeflow
post Mar 23 2006, 08:08 PM
Post #2


t-t-t-toyaaa
********

Group: Official Member
Posts: 19,821
Joined: Apr 2004
Member No: 11,270



See that is why I build the whole site in wordpress.

Anyways you tried doing it the first way by linking it before doing this:
<?include ("/home/.festus/classique/classique.impersonal.tv/header.php"); ?> ?

This probably won't make a diff but you can try spacing <? and include. It probably won't do anything at all though.
Like
<? include("dooooobydoobydoob");?>
 
*mipadi*
post Mar 24 2006, 09:08 AM
Post #3





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.)
 
technicolour
post Mar 24 2006, 09:52 PM
Post #4


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

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



NEVERMINDDD! I got it. Thank you both for your help. I was stupid and I didn't have my url to the right thing. Had to go through /blah/blah/blah like 8 times.

Thank you once againnnn!
 

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