Welcome Guest, Not a member yet? Register   Sign In
OS CHECK FUNCTION
#6

[eluser]champs[/eluser]
It really depends on exactly what sort of information you want here, but:

A) If you care about how paths are put together on the system, PHP has the DIRECTORY_SEPARATOR constant. Not that it matters if you use forward slashes for paths in Windows ports of PHP, but you can at least present the information nicely this way.

B) If you want to know what server software you are running under, use php_sapi_name(). It will return "cgi", "isapi" (IIS), "" for command line, etc.

C) If you just care about whether Windows is running, $_ENV['WINDIR'] has no legitimate reason to be set on anything but a Windows box.

HTH.


Messages In This Thread
OS CHECK FUNCTION - by El Forum - 09-15-2007, 03:54 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 04:01 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 05:07 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 05:27 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 09:22 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 10:04 AM
OS CHECK FUNCTION - by El Forum - 09-15-2007, 09:23 PM
OS CHECK FUNCTION - by El Forum - 09-16-2007, 09:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB