在Yii下进行模块化(module)编程以及出现Unable to resolve the request的解决办法
2015-04-10 17:01
615 查看
在Yii下进行模块化(module)编程以及出现Unable to resolve the request的解决办法
环境:NetBeans IDE ,wampserver
数据库:MySQL
以生成一个shop模块为例
【1】在工程中使用Gii生成模块文件夹modules (参考Yii通过Gii实现CRUD与生成Module)
【2】在protected/config文件夹下的main.php增加模块(重点注意)
如果没有在main.php下添加相应的模块,会出现错误提示" Unable to resolve the request "shop/shop/index" "
【3】在protected/views/layouts/main.php的链接访问,需要设置地址为
环境:NetBeans IDE ,wampserver
数据库:MySQL
以生成一个shop模块为例
【1】在工程中使用Gii生成模块文件夹modules (参考Yii通过Gii实现CRUD与生成Module)
【2】在protected/config文件夹下的main.php增加模块(重点注意)
如果没有在main.php下添加相应的模块,会出现错误提示" Unable to resolve the request "shop/shop/index" "
【3】在protected/views/layouts/main.php的链接访问,需要设置地址为
array('label'=>'Shop','url'=>array('/shop/shop/index'))
相关文章推荐
- 安装xcode6 beta 后调试出现Unable to boot the iOS Simulator以及编译苹果官方Swift的demo报错failed with exit code 1的解决办法
- YII Unable to resolve the request
- 当打开Oracle Jdevelopler 11g时出现"Unable to create an instace of the jave virtual Machine Located at path"错时解决办法
- Ubuntu / Debian: sudo 出现 unable to resolve host 错误解决办法
- sudo不起作用,出现unable to resolve host错误的解决办法
- Codeigniter出现Unable to connect to your database server using the provided settings错误解决办法
- 安装xcode6 beta 后调试出现Unable to boot the iOS Simulator以及编译苹果官方Swift的demo报错failed with exit code 1的解决的方法
- 关于 JDeveloper 出现 unable to create an instance of the java virtual machine 错误的解决办法
- 解决导入的Android项目中出现的The project was not built since和 Unable to resolve target 'android-19'错误
- yii [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "favicon.ico".'
- 关于搭载新版本SDK后,导入以前的工程出现Unable to resolve target 'android-6'的解决办法
- 导入android项目出现:出现Unable to resolve target 'android-8'错误及其他的一些解决办法
- Codeigniter出现Unable to load the requested class: zebra_pagination错误解决办法
- YII设置别名 'Unable to resolve the request "site/error".'
- 导入工程时出现Unable to resolve target 'android-18' error解决办法
- linux移植时出现 Unable to find the ncurses libraries ....解决办法
- 导入项目出现: Unable to resolve target ‘android-10′ 解决办法
- ubuntu 系统出现unable to resolve hostXXX问题的解决办法
- Vmware vSphere 出现 unable to connect to the mks问题的解决办法
- Maven install 时出现Unable to locate the Javac Compiler 解决办法