I am using ThinkPHP V5.1.18
php on the server is PHP 5.6.36 (cli)
Why does http://abc.com/public/index.php
access the Times on the server with the following error: it can be accessed normally on the local computer
[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