Get Apache Version


/ Published in: PHP
Save to your folder(s)

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

Example:

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

will return something along the lines of...

"Apache Version: 2.2.10 (Unix)"


Copy this code and paste it in your HTML
  1. function apacheversion() {
  2. $ver = split("[/ ]",$_SERVER['SERVER_SOFTWARE']);
  3. $apver = "$ver[1] $ver[2]";
  4. return $apver;
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.