thinkphp 5 nginx 下不支持 post json xml

浏览:1336 发布日期:2016/03/29 分类:求助交流
只支持 application/x-www-form-urlencoded apache下没问题
报错信息:

Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'Undefined index: source' in /webpro/weixin/thinkphp/tpl/think_exception.tpl:399
Stack trace:
#0 /webpro/weixin/thinkphp/tpl/think_exception.tpl(399): think\Error::appError(8, 'Undefined index...', '/webpro/weixin/...', 399, Array)
#1 /webpro/weixin/thinkphp/tpl/think_exception.tpl(90): parse_padding(Array)
#2 /webpro/weixin/thinkphp/library/think/Error.php(158): include('/webpro/weixin/...')
#3 /webpro/weixin/thinkphp/library/think/Error.php(79): think\Error::output(object(think\exception\ErrorException), Array)
#4 /webpro/weixin/thinkphp/library/think/Error.php(128): think\Error::appException(object(think\exception\ErrorException))
#5 [internal function]: think\Error::appShutdown()
#6 {main}
thrown in /webpro/weixin/thinkphp/tpl/think_exception.tpl on line 399

NGINX 配置

location / {
index index.htm index.html index.php;

if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?s=$1 last;
break;
}
}

location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param script_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

系统环境 centos 6.5 php5.6
最佳答案
评论( 相关
后面还有条评论,点击查看>>