From b0e65489d47104552ab5249c7b65812404a7c3c5 Mon Sep 17 00:00:00 2001 From: xiaomlove <353856593@qq.com> Date: Sat, 23 Jan 2021 17:39:17 +0800 Subject: [PATCH] add_func_getFullDirectory --- include/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/functions.php b/include/functions.php index cb9e04bd..f96c9b49 100644 --- a/include/functions.php +++ b/include/functions.php @@ -4416,4 +4416,12 @@ function saveSetting($prefix, $nameAndValue) sql_query($sql) or sqlerr(__FILE__, __LINE__); } +function getFullDirectory($dir) +{ + if (!is_dir($dir)) { + $dir = ROOT_PATH . $dir; + } + return realpath($dir); +} + ?>