Page 1 of 1

Why it doesn't display simple php?

Posted: Sun Dec 14, 2008 9:05 am
by raveX
Hello. Every time I'm placing some php function in either template or in content, cms always displays errors on the page instead of running that script.
Like for example here is a small php for RSS feed:

items, 0, 5);
// Cycle through each item and echo
foreach ($items as $item )
{
  echo ''.$item['title'].'';
}}else {  echo 'Error:'.magpie_error().'';}// Restore original error reporting value@ini_restore('error_reporting');
?>



It works totally fine if I just place it in *.php document and upload on the server. What am I doing wrong?
Thank you

Re: Why it doesn't display simple php?

Posted: Sun Dec 14, 2008 9:19 am
by JeremyBASS
You don't place php in the template... you can but you need to trun on {php} ... UDTs are where you put php in... And the help and handbook is were you find all this other... Hope that helps...

Re: Why it doesn't display simple php?

Posted: Tue Dec 16, 2008 12:31 am
by raveX
Thanks. I start using UDT.

Re: Why it doesn't display simple php?

Posted: Wed Dec 17, 2008 5:13 pm
by MarkP
Sorry I just put up a post, then I read this.

Could I get more detailed information about this?
JeremyBASS wrote: You don't place php in the template... you can but you need to trun on {php} ... UDTs are where you put php in... And the help and handbook is were you find all this other... Hope that helps...

This is my post  http://forum.cmsmadesimple.org/index.php/topic,28964.0.html