<!-- PHP --> not work in templates

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
NeoN_Style
Registered User
Posts: 3
Joined: Sun Mar 02, 2008 12:47 pm

<!-- PHP --> not work in templates

Post by NeoN_Style »

hello!

i have a trouble with PHP scripting in templates.

for example, in overall_footer.php i've insert example script:

<!-- PHP -->
echo "test";
<!-- ENDPHP -->

but it doesn't work!!!

what i should to do ?

P.S. Javascript not work also...
<script type="text/javascript">
writeln ('test');
</script>
result: no 'test' on page

P.S.S. answers on dumb questions:
1) It's before </body> and </html> tags. it's in the middle of template.
2) I've searched on phpBB development questions, and did not find anything about this
3) I need PHP in templates for "switch" and "readfile" function


Thanks, kind regards.

NeoN_Style
Registered User
Posts: 3
Joined: Sun Mar 02, 2008 12:47 pm

Re: <!-- PHP --> not work in templates

Post by NeoN_Style »

sorry, in "overall_footer.html"

User avatar
Nicholas the Italian
Registered User
Posts: 659
Joined: Mon Nov 20, 2006 11:19 pm
Location: 46°8' N, 12°13' E
Contact:

Re: <!-- PHP --> not work in templates

Post by Nicholas the Italian »

1) Such questions should be asked on phpbb.com
2) You need to enable PHP in templates in Security section of Admin Panel.
3) Make sure you refresh the template from Admin Panel and clear your browser cache after you've modified the code
4)
writeln ('test');
What's this, Pascal? :P

NeoN_Style
Registered User
Posts: 3
Joined: Sun Mar 02, 2008 12:47 pm

Re: <!-- PHP --> not work in templates

Post by NeoN_Style »

Nicholas the Italian wrote: 2) You need to enable PHP in templates in Security section of Admin Panel.

thanks. that was a problem :)

Post Reply