开发者

How to create getbaseurl in php framework zend?

开发者 https://www.devze.com 2023-01-30 17:24 出处:网络
How can i create baseurl method in zend so that it can be accessible to all the project files like model,form,view etc. can i creat开发者_运维百科e any in php

How can i create baseurl method in zend so that it can be accessible to all the project files like model,form,view etc. can i creat开发者_运维百科e any in php

Thanks Deepak


I think you should study Naming Conventions in Zend:

Zend Framework standardizes on a class naming convention whereby the names of the classes directly map to the directories in which they are stored. The root level directory of Zend Framework's standard library is the "Zend/" directory, whereas the root level directory of Zend Framework's extras library is the "ZendX/" directory. All Zend Framework classes are stored hierarchically under these root directories..

And you can get base url in zend something like this:

Zend_Controller_Front::getInstance()->getBaseUrl();
0

精彩评论

暂无评论...
验证码 换一张
取 消