 2922a13764
			
		
	
	
		2922a13764
		
			
		
	
	
	
	
		
			
			This introduce a helper class that should be used to log things, avoiding a lot of boilerplate code. Also all output are made in /tmp folder instead of beside the script itself. This is because there is a high chance that the folder containing the script is not writtable by webserver. So using the /tmp folder makes it more likely to works in a variety of setup.
		
			
				
	
	
		
			30 lines
		
	
	
		
			698 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			698 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @copyright   Copyright (C) 2011-2014 PhpSpreadsheet. All rights reserved.
 | |
|  * @author      Mark Baker
 | |
|  */
 | |
| chdir(__DIR__);
 | |
| 
 | |
| setlocale(LC_ALL, 'en_US.utf8');
 | |
| 
 | |
| // PHP 5.3 Compat
 | |
| date_default_timezone_set('Europe/London');
 | |
| 
 | |
| // Define path to application directory
 | |
| defined('APPLICATION_PATH')
 | |
|     || define('APPLICATION_PATH', realpath(__DIR__ . '/../src'));
 | |
| 
 | |
| // Ensure library/ is on include_path
 | |
| set_include_path(implode(PATH_SEPARATOR, [
 | |
|     realpath(APPLICATION_PATH . '/../src'),
 | |
|     './',
 | |
|     __DIR__,
 | |
|     get_include_path(),
 | |
| ]));
 | |
| 
 | |
| if (!defined('PHPSPREADSHEET_ROOT')) {
 | |
|     define('PHPSPREADSHEET_ROOT', APPLICATION_PATH . '/');
 | |
| }
 | |
| 
 | |
| require_once PHPSPREADSHEET_ROOT . 'Bootstrap.php';
 |