开发者

How to create getbaseurl in php framework zend?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜