访问不到页面
来源:3-8 前台页面设置公共布局(上)

慕慕7355481
2017-05-24
我使用原生的bootstrap建立导航,因为Controller使用了多个单词构成的驼峰形式,我在各个单词之间使用了“-”,但是网页还是访问不到。
<li><a href="<?php echo \yii\helpers\Url::toRoute('equipment-type/index'); ?>">装置类型</a></li>
我的controller是:EquipmentTypeController
action是:actionIndex。
老师,这是为什么呢?
写回答
3回答
-
访问地址应该是http://localhost:8080/jxsenergy/web/index.php?r=equipment-type/index,模板路径名称应该是EquipmentType
132017-05-25 -
慕慕7355481
提问者
2017-05-25
我的views下面的文件夹是equipmentType,
如果访问的是http://localhost:8080/jxsenergy/web/index.php?r=equipment-type/index,那么: the file not find。
如果我访问的是http://localhost:8080/jxsenergy/web/index.php?r=equipmentType/index,那么出现的是404错误
00 -
Jason
2017-05-25
看样子是没错,直接访问这个地址试试
012017-05-25
相似问题