Added new configuration option to Config class
This commit is contained in:
parent
65dc1dd8a5
commit
1cb0e161bf
1 changed files with 4 additions and 8 deletions
|
|
@ -11,6 +11,8 @@ class Config {
|
||||||
|
|
||||||
static public $base_url='';
|
static public $base_url='';
|
||||||
|
|
||||||
|
static public $data=[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Examples
|
/*Examples
|
||||||
|
|
@ -173,7 +175,7 @@ function filter_path($path_info) {
|
||||||
|
|
||||||
class Url {
|
class Url {
|
||||||
|
|
||||||
static public function make_url($module, $script='', $file='', $args=[]) {
|
static public function make_url($module, $script='', $args=[]) {
|
||||||
|
|
||||||
$url='/'.$module;
|
$url='/'.$module;
|
||||||
|
|
||||||
|
|
@ -183,19 +185,13 @@ class Url {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($file!='') {
|
|
||||||
|
|
||||||
$url.='/'.$file;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($args)>0) {
|
if(count($args)>0) {
|
||||||
|
|
||||||
$url.='/'.implode('/', $args);
|
$url.='/'.implode('/', $args);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Config::$base_url.'/index.php'.$url;
|
return Config::$base_url.'index.php'.$url;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue