Hi,
I tried creating a new page in indexu to implement a forum script. The page is on following format: http://domain.com/page.php?id=forum
Then I have placed that forum file under themes/kosmos/ as forum.html.
Everything fine so far right, the file forum.html looks like this:
It loads and works fine except from one thing...Code:<%include file="header.html" title="site.com" meta_keywords="" meta_description="" %> <div id="container"> <div id="main"> <%$hook_html_custom_page_template_begin%> <%php%>include "./forum/index.php"; <%/php%> <%$hook_html_custom_page_template_end%> </div> </div> <%include file="footer.html"%>
Take a look at this function:
It's supposed to return 3, however when I access the page via http://domain.com/page.php?id=forum instead of http://domain.com/forum/index.php it returns 0. This happens because the script doesn't take note of the "global". In other words: "global $a" equals 0, when it's supposed to be 1 and "global $b" equals 0 when it's supposed to be 2.Code:$a = 1; $b = 2; function Sum() { global $a, $b; $sum = $a + $b; return $sum; } $sum = Sum();
Anyone know what this could be?


) renamed as
