php跨平台总结 常用预定义常量
参考站点:http://hudeyong926.iteye.com/blog/1047304
# <?php # // *nix # echo DIRECTORY_SEPARATOR; // / # echo PHP_SHLIB_SUFFIX; // so # echo PATH_SEPARATOR; // : # # // Win* # echo DIRECTORY_SEPARATOR; // \ # echo PHP_SHLIB_SUFFIX; // dll # echo PATH_SEPARATOR; // ; # ?>
f (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 得到操作系统类型
DEFAULT_INCLUDE_PATH 得到php.ini中配置的include_path