PHP filter_input(INPUT_SERVER, 'REQUEST_METHOD') returns null?

后端 未结 5 2140
一整个雨季
一整个雨季 2021-01-01 18:20

Why does this line return null in my live server?

filter_input(INPUT_SERVER, \'REQUEST_METHOD\');

The live server is p

5条回答
  •  迷失自我
    2021-01-01 18:30

    I had the same problem where it was working on my local machine (OSX Mavericks, PHP version 5.4.24) and not on my live server (Cent OS 5). I upgraded the server from 5.3.9 to 5.5.15 (and added the mb and mcrypt functions although that's probably irrelevant) and now it works.

    This probably isn't helpful if you're on a shared host but you could ask them if they can rebuild PHP/Apache.

提交回复
热议问题