一聚教程网:一个值得你收藏的教程网站

热门教程

nginx系统中http状态码修改方法

时间:2022-06-30 18:44:17 编辑:袖梨 来源:一聚教程网

1,修改php.ini

cgi.fix_pathinfo=1
cgi.force_redirect=1
cgi.rfc2616_headers=1

把上面三个设置注释掉,就可以了。
2,php测试文件


header('HTTP/1.1 7001 this is test');
header('Content-type: application/json' );
exit;
?>
3,看结果

http 自定义 code 7001

热门栏目