脚本宝典收集整理的这篇文章主要介绍了zend-framework – Zend Url和模块名称区分大小写,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用zend命令行工具.我创建了几个模块Default和User,并将Default标记为应用程序@L_360_2@中的默认控制器.我也为这两个模块创建了各自的索引控制器/操作.
当我浏览网站根目录时,一切都很好.但是当我浏览$sITe_root $/ user时,我得到错误而不是索引控制器.
Notice: Undefined index: user in E:\xampp\PHP\PEAR\Zend\Controller\Dispatcher\Standard.PHP on line 384 Message: Invalid controller specified (index) Stack trace: #0 E:\xampp\PHP\PEAR\Zend\Controller\Front.PHP(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),Object(Zend_Controller_Response_Http)) #1 E:\xampp\PHP\PEAR\Zend\Application\Bootstrap\Bootstrap.PHP(97): Zend_Controller_Front->dispatch() #2 E:\xampp\PHP\PEAR\Zend\Application.PHP(366): Zend_Application_Bootstrap_Bootstrap->run() #3 E:\xampp\htdocs\$PRoject$\public\index.PHP(26): Zend_Application->run() #4 {main} Request Parameters: array ( 'module' => 'user','controller' => 'index','action' => 'index',)
但是当我浏览$site_root $/ User时,一切都还可以.显然,URL必须区分大小写才能反映模块名称.我想到了一些方法,就像重写Zend Request类一样.但是,在URL工作中获取小写模块名称的最佳做法是什么?
编辑1:文件夹结构:
以上是脚本宝典为你收集整理的zend-framework – Zend Url和模块名称区分大小写全部内容,希望文章能够帮你解决zend-framework – Zend Url和模块名称区分大小写所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。