? ????? Zend Framework ????? MVC ??????? Controller? ???? ??? ?????. ???? ? ??? ??? ??? ???. ??? ??? ??? ????.
??? MVC ???? Controller? ?? ??? ?? ???? ?????.
?? ?? ?:
root@coder-671T-M:/www/zf_demo1/application# tree.
├── Bootstrap.php
├── configs
│ └── application.ini
├── ????
│ ├── ErrorController.php
│ └── IndexController.php
├── ??
└── ??
├── ???
└── ????
├── ??
│ └── error.phtml
└── index
└── index.phtml
IndexController.php
<?php class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { // action body } }
??:
1. ????? ????? /application/controllers ????? ?????. ?? ????.
?? ???? ??? ??? ??? ? ????.
Zend_Controller_Front::run('/path/to/app/controllers');
?? ?? ???? ??? ??? ??? ? ????.
// Set the default controller directory: $front->setControllerDirectory('../application/controllers'); // Set several module directories at once: $front->setControllerDirectory(array( 'default' => '../application/controllers', 'blog' => '../modules/blog/controllers', 'news' => '../modules/news/controllers', )); // Add a 'foo' module directory: $front->addControllerDirectory('../modules/foo/controllers', 'foo');
????? ?? ????? ??? ? ????.
2. ???? ????? ?????
3. ????? Controller? ??? Zend_Controller_Action? ??????
4. ????? ? ??? ???? ???? ?? ???? ????. ???. Profit NewsListControlle
4. ?? ??? Controller.php? ????
5. ???? ???? init ???
public function init() { }
?? ??? ? ????.
? ?? PHP ?????? ???? ?? ??? ??? ??? ????. Zend Framework ????? MVC ????? ???? ?? ?? ?? ??? ? ??? PHP ??? ????? ?????!
? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??









