I am developing a PHP based system on a Windows platform, but it will be uploaded ultimately to a linux platform - both running the same versions of mysql apache and php. Is there any way I can test, say at the top of a file, what the OS type of the system that the page is currently being served from is?
The reason being, I have an include directory set up on windows machine that I use with set_include_path in each file, this will be different on the linux system because it will use /usr/directory/blah instead of c:\www\blah
I would like to be able to define the $path for set_include_path=$path differently depending on the OS
Hope that makes sense
Thanks in advance?
[SOLVED] Detect host OS type
Moderator: General Moderators
there is a magic constant
Code: Select all
echo PHP_OS;Problem Solved
Thanks! Much appreciated - that is just what I was looking for!
Problem Solved!
Problem Solved!