Displaying my Ads

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Displaying my Ads

Post by Vegan »

I tried placing:

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

but no ads are appearing

Thoughts?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
bugpanye
Forum Newbie
Posts: 7
Joined: Fri Nov 07, 2008 3:11 am

Re: Displaying my Ads

Post by bugpanye »

not sure...

is it?
<?php INCLUDE 'http://contract-developer.dyndns.biz/ad-rotator.php' ?>
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Displaying my Ads

Post 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() ?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Displaying my Ads

Post 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"; ?>
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: Displaying my Ads

Post 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.
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
bugpanye
Forum Newbie
Posts: 7
Joined: Fri Nov 07, 2008 3:11 am

Re: Displaying my Ads

Post 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
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: Displaying my Ads

Post 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
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply