MyBB Community Forums

Full Version: PHP code in the header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Smile

I wanted to put a php code in the header but he wasn't active there ... ist the header a html file ? When the Header is a HTML file what must I edit that i can save the the file as a php file ?

THX
You cannot add PHP to the templates so you'll have to add the code somewhere in global.php. Be warned though, you cannot echo any data or anything in that file!

Anything you want to echo or print must be assigned to a variable then that variable used in one of the templates.

Chris
hmm .... I wanted to put my advertisement php script (view.php) in the header

In the global php it wouldn't be so good ;D

I think i should try to include it with java script