Why it doesn't display simple php?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
raveX
Forum Members
Forum Members
Posts: 12
Joined: Mon Nov 24, 2008 7:01 am

Why it doesn't display simple php?

Post 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
JeremyBASS

Re: Why it doesn't display simple php?

Post 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...
raveX
Forum Members
Forum Members
Posts: 12
Joined: Mon Nov 24, 2008 7:01 am

Re: Why it doesn't display simple php?

Post by raveX »

Thanks. I start using UDT.
MarkP
Forum Members
Forum Members
Posts: 11
Joined: Wed Dec 17, 2008 5:00 pm

Re: Why it doesn't display simple php?

Post 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
Post Reply

Return to “CMSMS Core”