2012-03-21
yii framework exception 错误自定义
在yii framework中,如何定义错误呢? 在此介绍下yii中的 CHttpException 可以直接在controller action中 throw new CHttpException(404, '此页面找不到' ); 看下API中的chttpexception的construct public void __construct (integer $status, string
$message=NULL, integer $code=0) $status
integer
HTTP状态码,如 403, 404, 500, 等等.
$message
string
错误信息
$code
integer
错误码 更详细的内容,请查看yii中的API文档 阅读全文


