You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			34 lines
		
	
	
		
			662 B
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			34 lines
		
	
	
		
			662 B
		
	
	
	
		
			PHP
		
	
| <?php
 | |
| 	/**
 | |
| 	 * \file
 | |
| 	 * Source the project's `.phpenv` file.
 | |
| 	 */
 | |
| 
 | |
| 	/**
 | |
| 	 * @var $PROJECT_ROOT
 | |
| 	 * Root directory of the project.
 | |
| 	 */
 | |
| 	$PROJECT_ROOT = dirname(__FILE__);
 | |
| 
 | |
| 	(function(){
 | |
| 		global $PROJECT_ROOT;
 | |
| 
 | |
| 		$root_previous = "";
 | |
| 
 | |
| 		while (!file_exists("$PROJECT_ROOT/.phpenv")) {
 | |
| 			if (
 | |
| 				$PROJECT_ROOT == "/" ||
 | |
| 				$PROJECT_ROOT == "" ||
 | |
| 				$PROJECT_ROOT == $root_previous
 | |
| 			)
 | |
| 				throw new RuntimeException("Could not find .phpenv file.");
 | |
| 			$root_previous = $PROJECT_ROOT;
 | |
| 			$PROJECT_ROOT = dirname($PROJECT_ROOT);
 | |
| 		}
 | |
| 	})();
 | |
| 
 | |
| 	require_once "$PROJECT_ROOT/.phpenv";
 | |
| 
 | |
| 	// set_include_path(get_include_path() . PATH_SEPARATOR . $PROJECT_ROOT);
 | |
| ?>
 |