Share » Forums » General » Own php script!

Own php script!

Own php script!

Monday 12 May 2003 9:59:28 pm - 1 reply

Author Message

Bård Farstad

Wednesday 28 May 2003 2:20:04 am

To get access to a variable inside the template you need to set it first.

You can set template variables with the function setVariable(). A dirty example:

$tpl->setVariable( 'globals', $GLOBALS );

This will set the template variable globals, {$globals}, to the value of all global PHP variables.

However I would not recommend using the GLOBALS direcly, you should use the functions in eZHTTPTool to fetch variables. E.g. postVariable() should be used to fetch HTTP post variables.

--bård

Documentation: http://ez.no/doc

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu