时间:2021-07-01 10:21:17 帮助过:3人阅读
if(substr(strtolower(PHP_OS), 0, 3) == 'win') { $ini= ini_get_all(); $path = $ini['extension_dir']['local_value']; $b= substr($path,0,-3); $php_path = str_replace('\\','/',$b); $real_path = $php_path.'php.exe'; if(strpos($real_path, 'ephp.exe') !== FALSE) { $real_path = str_replace('ephp.exe', 'php.exe',$real_path); } }else{ $real_path = PHP_BINDIR.'/php'; } echo $real_path;
以上就是获取window或linux下php路径 的详细内容,更多请关注Gxl网其它相关文章!