Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用CDN,微信支付报invalid spbill_create_ip错误。 #39

Open
mantoufan opened this issue Mar 18, 2020 · 1 comment
Open

使用CDN,微信支付报invalid spbill_create_ip错误。 #39

mantoufan opened this issue Mar 18, 2020 · 1 comment

Comments

@mantoufan
Copy link

mantoufan commented Mar 18, 2020

查找了原因,发现使用CDN后,使用系统内置函数 GetClientIP 获取到的用户IP为:
218.17.xx.xx,218.93.204.51,36.42.75.103
变成了逗号分隔的三段式,后两个均为CDN的节点IP。

$ips = explode(',' $onlineip);
建议 return reset($ips);

@gongfuxiang
Copy link
Owner

查找了原因,发现使用CDN后,使用系统内置函数 GetClientIP 获取到的用户IP为:
218.17.xx.xx,218.93.204.51,36.42.75.103
变成了逗号分隔的三段式,后两个均为CDN的节点IP。

$ips = explode(',' $onlineip);
建议 return reset($ips);

好的,感谢你的反馈,我们这边优化一下,建议仅静态文件使用 cdn。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants