We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

the setVar() and setVars() not Work!

Controller code

public function indexAction() 

View code in index.phtml:

    echo $test;

the wrong message:

    Notice: Undefined variable: test in /data/wwwroot/shop/themes/views/backend/login/index.phtml on line 2

my php version is php 7,phalcon version is 2.1.