Added some of the standard directories darcs-hash:20080506151729-84dde-563da8505e06a7302041c93ab157ced31165876c.gz
		
			
				
	
	
		
			15 lines
		
	
	
		
			431 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			431 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| if ( !function_exists('sys_get_temp_dir')) {
 | |
| 	function sys_get_temp_dir() {
 | |
| 		if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); }
 | |
| 		if (!empty($_ENV['TMPDIR'])) { return realpath( $_ENV['TMPDIR']); }
 | |
| 		if (!empty($_ENV['TEMP'])) { return realpath( $_ENV['TEMP']); }
 | |
| 		$tempfile=tempnam(uniqid(rand(),TRUE),'');
 | |
| 		if (file_exists($tempfile)) {
 | |
| 			unlink($tempfile);
 | |
| 		}
 | |
| 		return realpath(dirname($tempfile));
 | |
| 	}
 | |
| }
 | |
| ?>
 |