Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 CakePHP 上,打开组件安全性和 CSRF,当组件捕获到它认为是攻击的东西时,它会抛出错误消息。
请求被黑洞 错误:在此服务器上找不到请求的地址“/登录”。
请求被黑洞
错误:在此服务器上找不到请求的地址“/登录”。
即使debug设置为0,也会显示错误消息。这对普通用户没有任何意义,并且可能会使任何人感到困惑,因为毕竟请求的地址是存在的。
debug
0
有没有办法在不接触 CakePHP 核心代码的情况下编辑该消息?或者也许重定向到$this->data空的推荐人?
$this->data
您可以编辑文件夹中的error400.ctpand并覆盖消息。error500.ctpapp/View/Errors/
error400.ctp
error500.ctp
app/View/Errors/