Php header Location returns 200

I am doing an official account Wechat login.
I jump to Wechat"s authorization with the following code:

header("Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$this->appid."&redirect_uri=".$REDIRECT_URI."&response_type=code&scope=snsapi_userinfo&state=STATE-sharpwechat_redirect");

however, the status code returned by the server is 200.

then I put error_reporting (E_ALL) in front of header;
doesn"t have anything to output either.

then I added a

directly after header.
header("Location:https://www.baidu.com");

jump directly to Baidu!
what is this situation?
--
I output the contents of header directly and find a mysterious line break! However, there are no newline characters here.

Sep.18,2021

  

look at your screenshot, wrap the appid parameter, and you try to URL the parameter.

Menu