When I try to run apache_get_version()
function on my website, I get an error:
Fatal error: Uncaught Error: Call to undefined function apache_get_version() in /srv/www/mywebsite.com/index.php:44 Stack trace: #0 {main} thrown in /srv/www/mywebsite.com/index.php on line 44
However this works in my localhost. I tried
function apache_version()
{
$ver = explode(" ",$_SERVER["SERVER_SOFTWARE"],3);
return ($ver[0] . " " . $ver[1]);
}
echo apache_version();
This should echo the server version on apache though it doesn't echo the version