new project structure
This commit is contained in:
		
							
								
								
									
										6
									
								
								app/Bootstrap.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/Bootstrap.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
// import autoload
 | 
			
		||||
 | 
			
		||||
// import routes
 | 
			
		||||
require_once './Routes.php';
 | 
			
		||||
							
								
								
									
										9
									
								
								app/Routes.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/Routes.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
$router = new Router();
 | 
			
		||||
 | 
			
		||||
$router->setDefault(function(){
 | 
			
		||||
	echo '404';
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
$router->run($_SERVER['REQUEST_METHOD'], '/'.$_GET['url']);
 | 
			
		||||
		Reference in New Issue
	
	Block a user