Zend Framework 1.12.3, part 1 – First application

Today I do my first Zend application in PHP in Netbans IDE. I describe this how You may do it step by step.
First open Netbeans IDE. Then choose from menu File->New Project.
In wizard window choose in category PHP and in Projects  PHP Application.
In another step write in Project Name field any name, in my it is PhpZendProj.
Click Next button.
Next window You leave unchanged and click Next button.
In next window with list of fameworks, select Zend PHP Web Framework option and click Finish button.
On the left side You view structure of Zend application.
The important are two folders: controllers and views. In views in scripts node are files with view gets from controller. All view files have the same name as their folder and controller name. Example IndexConroller.php is the index controller. This controller have in node view index folder within index.phtml file.
Let print on the web site string: “Zend Project”. In this case You double click on index.phtml. In Editor You will see the opened index.phtml file.
Delete all code in this file and paste this:



It is my first web side


Zend Project




Save file(choose from menu File->Save or type on keyboard Ctrl+S).Click on green icon:
Wait a moment. The browser run. In address bar You see http://localhost/PhpZendProj/
If You don’t see your website, like that:
it is mean that Yuo don’t run Apache server. Open xampp Control Panel, if your server it is, and click Start next to Apache label and try again run Your application.
Oh, this time You see folders.
But You would like see string: “Zend Project”. What’s wrong? You must set in this project path to index.dhtml file. So right click on project node and choose Set configuration and then Cusomize.
You view Project Properties wizard, in it in Project URL field add public folder on the end path.
You may click run icon in Netbeans. In this time You see website with Zend Project string.