我在使用findbyid獲取共享主機上的頁面的唯一URL時遇到此問題。我的問題是在試圖通過該項目的ID號來訪問共享主機(我不明白在localhost這個問題)的獨特的網頁,我不斷收到以下錯誤:未在控制器中定義的操作cakephp
Error: The action item is not defined in controller ProductsController
Error: Create ProductsController::item() in file: app/Controller/ProductsController.php.
但是項目被定義在ProductsController類:
你可以在這個網址看到了問題:http://entourmag.com/hava/products/item/39
它通過WAMP工作在本地主機,所以我不知道是什麼問題。
在此先感謝
是你實際上位指示名爲'ProductsController'(複數和大小寫混合)?該文件是'ProductsController.php'? – arilia