【发布时间】:2015-07-02 15:02:01
【问题描述】:
我正在使用 cakephp 2.0.4(在现有项目中进行更改)
我的控制器功能是..
class PagesController extends AppController {
public function getlocations($string = ''){
$this->autoRender = false;
$aResult = array(0=>'Florida', 1=>'London');
echo json_encode($aResult);
}
}
我也尝试过 $this->autoLayout = $this->autoRender = false;
当我在浏览器 mysite/app/pages/getlocations 中直接调用此操作时,会出现以下错误
View file "/home/mysite/public_html/testing/app/View/Pages/g.ctp" is missing.
【问题讨论】:
标签: cakephp