How do I get the zend framework to say hello world in a browser?

I finished some steps at http://framework.zend.com/manual/en/learning.quickstart.create-project.html and made it work to such an extent that if I type "localhost" in my browser, I come to Zend server test page.

I have experience using xampp and php (I recently decided to use the framework for some of my client work), and in xampp I create all my test pages in the โ€œhtdocsโ€ folder and just type โ€œlocalhost / mysites / test .php.โ€ I donโ€™t know how to do it.

Before I start using all the MVC materials within Zend, I need to know where to save all my php files, and now I just want to display "hello world" via zend so that I know where to save the files and what address to type in the browser.

+4
source share
2 answers

This question is not very clear. In any case, I assume that you created your project correctly. To print "hello world" in your browser, make this small change:

In IndexController.php inside the indexAction () method write:

$this->view->String = 'hello world'; 

Now go to the index.phtml file in the view / scripts / index section and write (it is better if you delete all the lines that you see in it):

 <?php echo $this->String; ?> 

Now, by typing the address bar of your localhost browser, you can see "hello world." Hope this helps.

+6
source

Please check Zend Framework Installation or Hello world Zend Framework . This will help us install Zend Frame Work along with the corresponding screenshots attached to it.

-1
source

Source: https://habr.com/ru/post/1380681/


All Articles