News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Error trying to include pages

Started by hanzs7050, May 08, 2011, 03:47:09 PM

Previous topic - Next topic

hanzs7050

I try to add this code:

<?
include_once("iklan.php");
echo "<div align='center'>$bannerAd</div>";
?>


on this page: "Themes / default / index.template.php"
I get errors..

NanoSector

try to remove the <? and ?> tags?

PS you should NOT use <?, use <?php instead. The shorttag needs to be enabled for it to work.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

ascaland

By the way, what are those errors?

hanzs7050

i get this errors..

Template Parse Error!
There was a problem loading the /Themes/nly-greynew/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting ',' or ';'

Sir Osis of Liver



include_once("iklan.php");
echo '<div align="center">' . $bannerAd . '</div>';



Make sure it's not inside another echo statement.

When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: