我使用的是ThinkPHP V5.1.18版本
服务器上php版本是PHP 5.6.36 (cli)
[4] ErrorException in Helpers.php line 83
syntax error, unexpected '?'
/**
Return current url.
*
@return string
*/
function current_url()
{
$protocol = 'http://';
if ((!empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') {
$protocol = 'https://';
}
return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
/**
Return random string.
*
Call Stack
in Helpers.php line 83
at Error::appShutdown()
Environment Variables