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.
我正在使用 Yii 框架,404如果在数据库中找不到重新编码,我想生成错误。有没有什么聪明的方法Yii default error handler应该被调用。
404
Yii default error handler
提前致谢。
throw new CHttpException(404,'The specified post cannot be found.');
http://www.yiiframework.com/doc/guide/1.1/en/topics.error