Compare commits

..

No commits in common. "e294eaa7afa33f74d2b8c335eaba19608e159e46" and "c65fcd27c895bca2ff6b88f8388d269a7014f319" have entirely different histories.

2 changed files with 1 additions and 16 deletions

View File

@ -82,7 +82,7 @@ class Router {
*/ */
public static function basePath(): string public static function basePath(): string
{ {
if (defined('SITE_URL') && !empty(SITE_URL)) if (defined('SITE_URL'))
return parse_url(SITE_URL, PHP_URL_PATH); return parse_url(SITE_URL, PHP_URL_PATH);
return str_replace($_SERVER['DOCUMENT_ROOT'], '/', ROOT_DIR); return str_replace($_SERVER['DOCUMENT_ROOT'], '/', ROOT_DIR);
} }

View File

@ -145,20 +145,5 @@ class View extends Neuron {
header('Content-Type: text/plain; charset=utf-8'); header('Content-Type: text/plain; charset=utf-8');
print($txt); print($txt);
} }
/**
* Intenta devolver la url absoluta a partir de una ruta relativa.
*
* @param string $path
*
* @return string
*/
public function route(string $path = '/'): string
{
if (defined('SITE_URL') && !empty(SITE_URL))
return SITE_URL.substr($path,1);
return $path;
}
} }
?> ?>