PDA

View Full Version : PHP code in a custom page template


Elektronkind
09-13-2004, 12:05 PM
OK, so I made a new template for a CMPS page and it works.

But I have some PHP code (enclosed in <?php ?> brackets) in this template that I want executed when this page is loaded. It's for my streaming radio station and I need to parse some XML status messages from the radio server. This code, however, is not being executed and it being quoted literally in the page output... so if you "View Source" on the page you see the PHP code as if it were a HTML comment or something.

How can I include working PHP code in the template for this one page?

TIA
/dale

Brian
09-13-2004, 12:19 PM
You would need to add the php code in a file as templates can not parse php.