How do I create a controller with no view and model?
Making a services_controller to spit out json.This is what I have now.
var $uses = a开发者_如何转开发rray();
function test() {
$this->autoRender = false;
echo "test";
}
However, that doesn't print out the "test" message.
Thanks,
TeeThe above code actually works. The issue was somewhere else related to the Auth component.
Thanks,
Tee
Just write $this->autoRender = false; at the end of the function. It will surely work.
I know that using the statement below your controller is without reference to any model:
public $ uses = null;
$this->autoRender = false;
This one works like a die() function. Put it at the end of the function.
精彩评论