Answer the question
In order to leave comments, you need to log in
Why is the first view not displayed on phalcon 2.1?
I'm following the documentation clearly. The Sending results to
index.phtml view
contains the string "hello world!" - not displayed
located in app/views/index/
<?php
use Phalcon\Mvc\Controller;
class IndexController extends Controller
{
public function indexAction()
{
// echo "ddd"; //так выводит
}
}
Answer the question
In order to leave comments, you need to log in
If we are talking about INVO again, then the point is that the phtml template engine is not connected by default , but a very convenient volt template engine is connected . All volt files are automatically compiled into phtml representations (yes, the default extension there is "php" (any one can be set), but phtml, as I understand it, is php + html).
Write the same "Hello world!" in the volt-file of the same name.
If you need to write templates specifically in php + html (I don’t think it’s convenient), read how to connect it (template engine), or I’ll write it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question