A
A
Alexander Ivanov2016-05-07 23:54:26
PHP
Alexander Ivanov, 2016-05-07 23:54:26

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

1 answer(s)
Z
ZaxapKramer, 2016-05-08
@cimonlebedev

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 question

Ask a Question

731 491 924 answers to any question