Posted By

iridium on 01/03/09


get number apache version

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Get Apache Version

 / Published in: PHP

Return just the Apache version number of your server, and operating system, from $SERVER['SERVERSOFTWARE']


print ('Apache Version: ' . apacheversion());

will return something along the lines of...

"Apache Version: 2.2.10 (Unix)"

  1. function apacheversion() {
  2. $ver = split("[/ ]",$_SERVER['SERVER_SOFTWARE']);
  3. $apver = "$ver[1] $ver[2]";
  4. return $apver;
  5. }

Report this snippet  

You need to login to post a comment.