Throwing a custom 503 exception in CakePHP 2

后端 未结 2 1034
-上瘾入骨i
-上瘾入骨i 2020-12-20 03:37

I need to give a 503 Service Unavailable HTTP header.

Normally I use these for 404 and 500 codes

throw new NotFoundException();
         


        
2条回答
  •  感情败类
    2020-12-20 04:38

    http://api22.cakephp.org/class/cake-response#method-CakeResponsestatusCode

    Will allow you to set a status code.

提交回复
热议问题