猿问
php怎么写能让jq的ajax进入error回调函数
就是我的php执行什么代码,或者输出什么以后,我网页那边用jquery提交的ajax能进入error回调函数,最好是能带信息的那种
HUH函数
浏览 647
回答 2
2回答
一只斗牛犬
PHP 代码示例:// 构建&输出 Response Header 头信息$code = 500; $errormessage = 'Internal Server Error'; $status_header = 'HTTP/1.1 ' . $code . ' ' . $errormessage; header($status_header);// 输出Response body$data = array('msg' => 'this is error message');echo json_encode($data);exit;
0
0
0
随时随地看视频
慕课网APP
相关分类
PHP
php如何把参数放在Http Request Heade????
1 回答
我要回答