Write a PHP script to get the information about the operating system PHP is running on
code:-
<?php
echo php_uname()."\n";
echo PHP_OS."\n";
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo '<br>This is a server using Windows!';
} else {
echo '<br>This is a server not using Windows!'."\n";
}
?>
output:-
Windows NT LAPTOP-3KV6KVJ7 10.0 build 22000 (Windows 10) AMD64 WINNT
This is a server using Windows!
This is a server using Windows!
Post a Comment
If you have any doubts, Please let me know
Thanks!