[Pmwiki-users] PHP-functions inside the template
Patrick R. Michaud
pmichaud
Fri Oct 29 06:31:20 CDT 2004
On Fri, Oct 29, 2004 at 11:26:00AM +0100, ODY wrote:
> I read about PHP-function calls inside the pmwiki.tmpl file, but I can't get
> it working... could somebody show me how to insert something like:
> <?PHP
> echo phpinfo();
> ?>
PHP code doesn't embed directly into the pmwiki.tmpl file, but you can use
the <!--function:MyFunction--> marker to call a custom PHP function that you
define in your config.php. For example, in config.php, place
function MyPHPInfo($pagename,$args) { phpinfo(); }
and then in the .tmpl file
<!--function:MyPHPInfo-->
will call the MyPHPInfo function, which can execute whatever PHP code
you wish.
Pm
More information about the pmwiki-users
mailing list