right now, i code custom wordpress theme and testing it in xampp windows XP on apache server. But as long as i concern, there's no wp build-in function to identify the code environment. Is there's any PHP build-in function to identify such thing ?
for the record, what i want to code need to read a directory. in my apache (in windows), the path will be c:/xampp/htdocs where apache on linux will be \somepath\somepath\
so, is there any code solution to know what is the OS environment without i have to retrieve and compare the path ? i hope it will also work on other开发者_如何学JAVA OS with other webserver then APACHE such as IIS
You want php_uname() for this, and possibly php_sapi_name().
$_SERVER['SERVER_SOFTWARE'] should do it for you.  Use strpos to look for Win32 or Unix.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论