我有这个功能。
function getCallbackUrl(){
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . 'response.php';
}
在我的 URL 上,http://localhost/gateways/payu/index.php上述函数显示这样的 URL http://localhost/gateways/payu/index.phpresponse.php。不知道为什么会这样。该功能对我来说似乎是正确的。也许我遗漏了一些我无法将基本名称从index.phpto替换的东西response.php。任何帮助将不胜感激。谢谢 :)
呼如林