1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Risoluzione del bug #83

Risoluzione del bug #83, causato da un problema di confronto tra percorsi.
This commit is contained in:
Thomas Zilio
2017-12-22 11:44:27 +01:00
parent c432209ea6
commit a2c6a6984d
4 changed files with 20 additions and 3 deletions

View File

@ -879,3 +879,20 @@ function isMobile()
{
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER['HTTP_USER_AGENT']);
}
/**
* Restituisce il percorso derivante dal file in esecuzione.
*
* @return string
*/
function getURLPath()
{
$path = $_SERVER['SCRIPT_FILENAME'];
$prefix = $_SERVER['DOCUMENT_ROOT'];
if (substr($path, 0, strlen($prefix)) == $prefix) {
$path = substr($path, strlen($prefix));
}
return slashes($path);
}