当我将我的 cakePHP 2.0.0 应用程序上传到我的主机时,当我通过 ajax 调用函数时,我得到了一个 MissingViewException。这将返回一个由元素生成的 json 对象。在我的本地 xampp 上一切正常,但是当我将它上传到我的主机 bytebob.com 时,我得到了异常。
我已经尝试对我的 .htaccess 进行更改,如高级 CakePHP 安装页面中所述,但它并没有改变任何东西。
这是错误日志:
2011-10-25 18:26:04 Error: [MissingViewException] View file "/jalmar/app/View/elements/json.ctp" is missing.
0 /home/sites/jayar.dk/public_html/jalmar/lib/Cake/View/View.php(363): View->_getViewFileName('/elements/json')
1 /home/sites/jayar.dk/public_html/jalmar/lib/Cake/Controller/Controller.php(898): View->render('/elements/json', NULL)
2 /home/sites/jayar.dk/public_html/jalmar/app/Controller/AppController.php(22): Controller->render('/elements/json')
3 /home/sites/jayar.dk/public_html/jalmar/app/Controller/TilmeldingsController.php(147): AppController->sendJson(Array, Array)
4 [internal function]: TilmeldingsController->check_glogon()
主机将 php 作为 CGI 运行,但我认为这不是原因......