mirror of
				https://github.com/uklans/cache-domains
				synced 2025-11-04 13:08:53 +01:00 
			
		
		
		
	adding a include file to include commen files
This commit is contained in:
		
							parent
							
								
									4c3b99938b
								
							
						
					
					
						commit
						0dedf64140
					
				
							
								
								
									
										26
									
								
								scripts/lib/include.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								scripts/lib/include.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ------------------------------------------------------------ //
 | 
				
			||||||
 | 
					// Array of files to include
 | 
				
			||||||
 | 
					// ------------------------------------------------------------ //
 | 
				
			||||||
 | 
					$includes = array(
 | 
				
			||||||
 | 
										"functions",
 | 
				
			||||||
 | 
										"cli_mode",
 | 
				
			||||||
 | 
										"web_mode",
 | 
				
			||||||
 | 
									);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ------------------------------------------------------------ //
 | 
				
			||||||
 | 
					// Include the php files in the array
 | 
				
			||||||
 | 
					// ------------------------------------------------------------ //
 | 
				
			||||||
 | 
					foreach ($includes as $key => $value) 
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						//Always finde the correct path
 | 
				
			||||||
 | 
						$dir_path = __FILE__;
 | 
				
			||||||
 | 
						$dir_path = str_replace("include.php", "", $dir_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						require_once $dir_path . $value . ".php";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					?>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user