📜  Cakephp json 响应 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.992000             🧑  作者: Mango

代码示例1
$content = json_encode(['method' => __METHOD__, 'class' => get_called_class()]);

$this->response = $this->response->withStringBody($content);
$this->response = $this->response->withType('json');
// ...

return $this->response;