所以,我们后台执行的程式可以这样修改,实用于linux和windows:
$now_os = PHP_OS; if ($now_os == 'Linux'){// this is for Fedora 8 $p = "/usr/bin/php"; } else{ $document_root = $_SERVER['DOCUMENT_ROOT']; $path_array = explode("/",$document_root); $path_len = count($path_array); for($i=0;$i<($path_len-1);$i++){ $p .= $path_array[$i]."\\"; } $p .="php5\\php.exe"; } system("".$p." queue_run_firm.php ".$p." ".$class." "); |