I have phalcon 3.4.4 installed on windows 01 with php 7.3.7 in my local machine.
i have following code
<?php
$view = $this->view;
$view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);
$view->render("", "testtest");
$content = $view->getRender('', "testtest", array("name"=>"Mr. XYZ"), function($view)
{
$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
});
echo $content;
exit;
And Another way to get same output
<?php
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$content = $this->view->getRender('', "testtest", array("name"=>"Mr. XYZ"), function($view)
{
$view->setRenderLevel(View::LEVEL_LAYOUT);
});
echo $content;
exit;
Both of the above code snippets works perfectly fine in my local machine.
But in production server $content
returns empty string. No errors displayed and no errors in error logs. The production server is ubuntu with php 7.3.6 with phalcon 3.4.3
Can anybody help me on this what might be wrong, did I miss anything?
Thanks.