Update functions.php

pull/13/head
qkqpttgf 2020-01-05 16:53:40 +08:00 committed by GitHub
parent 84c270490b
commit 20d44cb333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,8 @@
function getpath()
{
$_SERVER['base_path'] = substr($_SERVER['SCRIPT_NAME'], 0, -10);
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
$p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
else $path = $_SERVER['REQUEST_URI'];