Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 197
E
enthusiast
enthusiast
E Offline
Joined: Jun 2006
Posts: 197
I'm gettint this error when try to insert a custom island:

Parse error: syntax error, unexpected '<' in /www/htdocs/imigrarorg/forum/cache_builders/custom/portal_box_1.php on line 5

The lines I'm trying to put there is this:
<?php
if (@include('/usr/local/apache2/htdocs/imigrarorg/sponsor/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:2', 0, 'top', '', '1', $phpAds_context);
echo $phpAds_raw['html'];
}
?>


if I remove the <?php at the begining nad ?> at the end, there is no error, but the php function didn't work either.
It's a code for OpenAds that I'm trying to make work there.

Any ideas?


PS: I try using Java code with the same result when typing < on the code



Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Are you inserting this at the top area? If so, theres no reason to use opening and closing php tags as they're already implied.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 197
E
enthusiast
enthusiast
E Offline
Joined: Jun 2006
Posts: 197
No, I putting the full php code between the EOF codes.
Like you can see below.

If I remove <?php, the UBB accepts the change, but won't work on the page.


/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF


<?php
if (@include('/usr/local/apache2/htdocs/imigrarorg/sponsor/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:2', 0, 'top', '', '1', $phpAds_context);
echo $phpAds_raw['html'];
}
?>



EOF;
/* DO NOT CHANGE THE LINE ABOVE */



Joined: Sep 2006
Posts: 120
member
member
Joined: Sep 2006
Posts: 120
Is this getting into what I posted about code in Custom Islands??

See this thread

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Dumb question, why not just post your php code in the phpcode area?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Mors), 833 guests, and 197 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)