echo PHP_OS; // output: CentOS
But if we want to get more detailed information about the OS, we may use php_uname
echo php_uname('s'); // output: Linux 2.6.18-348.6.1.el5 x86_64
php_uname gives information including; OS name, OS version, if it is 32bit or 64bit.
No comments:
Post a Comment