From 1e74389e338cdc965f78a1cd0750f6e8a594537d Mon Sep 17 00:00:00 2001 From: revofpla Date: Tue, 16 Jan 2018 23:01:45 +0900 Subject: [PATCH] =?UTF-8?q?[php5=5Fdebug]=20func.php=EC=97=90=EC=84=9C=20d?= =?UTF-8?q?elInDir=20=ED=95=A8=EC=88=98=EC=97=90=EC=84=9C=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EA=B0=80=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0?= =?UTF-8?q?=EC=97=90=20=EB=AC=B4=ED=95=9C=EB=A3=A8=ED=94=84=20=EB=8F=8C=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EC=9D=8C.=20=EB=94=B0=EB=9D=BC=EC=84=9C,?= =?UTF-8?q?=20opendir=EC=9D=B4=20false=EA=B0=80=20=EB=96=A8=EC=96=B4?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=ED=95=B4=EB=8B=B9=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=EB=8A=94=20=EC=97=86=EB=8B=A4=EA=B3=A0=20?= =?UTF-8?q?=EB=B3=B4=EA=B3=A0=20=EC=A7=84=ED=96=89=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/twe/func.php b/twe/func.php index 75e2faeb..5620c6c7 100644 --- a/twe/func.php +++ b/twe/func.php @@ -79,17 +79,19 @@ function abilityPowint() { function delInDir($dir) { $handle = opendir($dir); - while(false !== ($FolderOrFile = readdir($handle))) { - if($FolderOrFile == "." || $FolderOrFile == "..") { - continue; - } + if($handle !== false){ + while(false !== ($FolderOrFile = readdir($handle))) { + if ($FolderOrFile == "." || $FolderOrFile == "..") { + continue; + } - $filepath = sprintf('%s/%s', $dir, $FolderOrFile); - if(is_dir($filepath)) { - delInDir($filepath); - } // recursive - else { - @unlink($filepath); + $filepath = sprintf('%s/%s', $dir, $FolderOrFile); + if (is_dir($filepath)) { + delInDir($filepath); + } // recursive + else { + @unlink($filepath); + } } } closedir($handle);