Page 1 of 1

Displaying my Ads

Posted: Thu Nov 06, 2008 11:46 am
by Vegan
I tried placing:

<p>
<!-- INCLUDE http://contract-developer.dyndns.biz/ad-rotator.php -->
</p>

but no ads are appearing

Thoughts?

Re: Displaying my Ads

Posted: Fri Nov 07, 2008 3:35 am
by bugpanye
not sure...

is it?
<?php INCLUDE 'http://contract-developer.dyndns.biz/ad-rotator.php' ?>

Re: Displaying my Ads

Posted: Fri Nov 07, 2008 3:45 am
by papa
Are you guys serious ?

In order to do php you must know some html at least.

<!-- is a comment in html

include is a function. So how do you usually work with functions ?

Could it be include() ?

Re: Displaying my Ads

Posted: Fri Nov 07, 2008 3:48 am
by requinix
Don't include files with the full URL if they're on your own server. It's like calling your neighbor long-distance.

Code: Select all

<?php include $_SERVER["DOCUMENT_ROOT"] . "/ad-rotator.php"; ?>

Re: Displaying my Ads

Posted: Fri Nov 07, 2008 8:07 pm
by Vegan
My document root is for example / and phpBB3 is off that, and deeper down were the templates are is where I am putting the call, but the ad program is at the document root.

On other domains, I wanted to use the same module so I have 1 ad file to manage instead of several.

Re: Displaying my Ads

Posted: Fri Nov 07, 2008 9:58 pm
by bugpanye
well assuming that all the domains are on the same server, you can use absolute pathing to include the ad program file;

reference?
http://www.ibdhost.com/help/path/

edit typo

Re: Displaying my Ads

Posted: Mon Nov 10, 2008 8:55 am
by Vegan
my sites are all stored in /web on the Linux server rather than in the /var/www. I simply pointed Apache2 to the desired folder, then I shared the folder with Samba to make it easy to edit with a Windows box.

The reason I wanted to use a full URL is to be able to post ads all over hell's half acre.

I realized that for localhost this is fine, but not everything is localhost.

:D