includes/functions.php
changeset 1341 90e2064c8ea2
parent 1339 03c5b9e8e02a
child 1355 12c23b83c79d
equal deleted inserted replaced
1340:d1d64b373878 1341:90e2064c8ea2
  5319  */
  5319  */
  5320 
  5320 
  5321 function which($executable)
  5321 function which($executable)
  5322 {
  5322 {
  5323 	$path = get_system_path();
  5323 	$path = get_system_path();
  5324 	if ( empty($paths) )
  5324 	if ( empty($path) )
  5325 		return false;
  5325 		return false;
  5326 	
  5326 	
  5327 	$win32 = ( PHP_OS == 'WINNT' || PHP_OS == 'WIN32' );
  5327 	$win32 = ( PHP_OS == 'WINNT' || PHP_OS == 'WIN32' );
  5328 	$extensions = $win32 ? array('.exe', '.com', '.bat') : array('');
  5328 	$extensions = $win32 ? array('.exe', '.com', '.bat') : array('');
  5329 	$separator = $win32 ? ';' : ':';
  5329 	$separator = $win32 ? ';' : ':';