Hello,
I'm trying to play a PHP game I made on my old forum ..
To start I created a folder with a file inside it in src/FI/ named index.php, inside I inserted this code:
Then I created a node of type Page and I inserted the PHP callback of the class as follows:
This works if inside the class I insert a simple:
Although this is displayed above the breadcrumb and not below the title ..!
Unfortunately, however, if I insert a {xen: raw $example} in the HTML code it is displayed as it is .. Where am I wrong?
I'm trying to play a PHP game I made on my old forum ..
To start I created a folder with a file inside it in src/FI/ named index.php, inside I inserted this code:
PHP:
<?php
namespace FI;
class index
{
public static function test(\XF\Pub\Controller\AbstractController $controller, \XF\Mvc\Reply\AbstractReply &$reply)
{
$params = [
'example' => "work!"
];
$reply->setParams($params);
}
}
Then I created a node of type Page and I inserted the PHP callback of the class as follows:
FI\index :: test
This works if inside the class I insert a simple:
PHP:
echo "test";
Unfortunately, however, if I insert a {xen: raw $example} in the HTML code it is displayed as it is .. Where am I wrong?