这很奇怪,我已经为这个错误破解了一段时间。它似乎只显示在部署服务器上。我有一个完美工作的控制器,名为 holiday - 这是控制器的结构和视图:
controllers
-> HolidaysController.php
<?php
class HolidaysController extends App_Controller_Action {
public function indexAction() {
.....
}
}
?>
我的意见文件在
views/scripts/holidays/index.phtml
当我导航到website.com/holidays
它时给我这个错误:
An error occurred
Page not found
Exception information:
Message: Action "index" does not exist and was not trapped in __call()
Stack trace:
#0 /home/bookitfa/bookings/library/Zend/Controller/Action.php(515): Zend_Controller_Action->__call('indexAction', Array)
#1 /home/bookitfa/bookings/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#2 /home/bookitfa/bookings/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /home/bookitfa/bookings/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#4 /home/bookitfa/bookings/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#5 /home/bookitfa/bookings/public/index.php(29): Zend_Application->run()
#6 {main}
Request Parameters:
array (
'controller' => 'holidays',
'action' => 'index',
'module' => 'default',
)
但是当我导航到website.com/Holidays
它时,出于某种奇怪的原因。所有其他控制器都可以正常工作,除了这个特定的控制器似乎只有在控制器名称的第一个字母大写时才能工作。这是为什么?这是一个基于 zend 框架的应用程序。我所有的网址都会像这样不合适。编辑 =======
奇怪的是,无论我保留什么文件名,即 HolidaysController.php 或 holidayController.php - 在线我只能通过 /Holidays 而不是 /holidays 访问它,这是一个非常严重的问题,我已经用完了关于如何解决它的想法:(