I wonder if I have made a mistake with Apache, I have some code to show an ad, but PHP is not parsing the PHP code to generate the ad.
Thoughts, I using Linux Server for the record.
Code not parsing
Moderator: General Moderators
Code not parsing
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: Code not parsing
what's your config look like?
what distro?
what distro?
Re: Code not parsing
I have checked everything, the include works, so I am wondering what am I doing wrong?
For example:
And I see the code for Google Analytics fine, so my ad tool has some PHP code:
This simply comes up as included text (not the ad desired), thoughts?
For example:
Code: Select all
<?php include $_SERVER["DOCUMENT_ROOT"] . "/google.php"; ?>And I see the code for Google Analytics fine, so my ad tool has some PHP code:
Code: Select all
// Tower Ads intended for display below the navigation block
$ads = array(
// Microsoft has the best selection of advertisements
array(
'http://click.linksynergy.com/fs-bin/click?id=jaxflTaXP3Y&offerid=166833.10000242&subid=0&type=4',
'Microsoft Store',
'http://ad.linksynergy.com/fs-bin/show?id=jaxflTaXP3Y&bids=166833.10000242&subid=0&type=4&gridnum=9'
),
array(
'http://click.linksynergy.com/fs-bin/click?id=jaxflTaXP3Y&offerid=166833.10000292&subid=0&type=4',
'Microsoft Store',
'http://ad.linksynergy.com/fs-bin/show?id=jaxflTaXP3Y&bids=166833.10000292&subid=0&type=4&gridnum=9'
)
);
$ad = $ads[array_rand($ads)];
echo "<a href='{$ad[0]}'><img alt='{$ad[1]}' src='{$ad[2]}'/></a><br />";
This simply comes up as included text (not the ad desired), thoughts?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: Code not parsing
It sounds like the code you displayed is an .html file. Change the extension to .php and let me know what happens.
And don't forget to close your php code with the "?>" tag.
And don't forget to close your php code with the "?>" tag.
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: Code not parsing
does it output the html tags and all that? are they being parsed? im confused >.<