fix: router.core.router (now manages URI with beginning slash '/' (removes it))

This commit is contained in:
xdrm-brackets 2018-02-07 14:50:36 +01:00
parent eb604f2299
commit f1c338853f
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ class Router{
* *
*/ */
public function __construct($url){ public function __construct($url){
// Format URI (ne doit pas avoir le premier '/')
if( preg_match("@^/@", $url) )
$url = substr($url, 1);
$this->url = $url; $this->url = $url;
// On initialise les routes // On initialise les routes