From 7872226002e66ead846bb5886bcc6fded2f16db2 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 18 Oct 2012 03:02:13 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=AD?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=8F=B3=E8=BE=B9=E7=9B=AE=E5=BD=95=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/proftp.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/proftp.php b/tools/proftp.php index b129c39d..f5ef1463 100644 --- a/tools/proftp.php +++ b/tools/proftp.php @@ -37,7 +37,7 @@ $row = pg_fetch_array($result, $ri); $content.='# path: '.$row['path']."\n"; $content.='mkdir -p "/home/ftp/westdc_'.$row['userid'].'/'.basename($row['path']).'"'."\n"; - $content.='mount --bind "'.$row['path'].'" "/home/ftp/westdc_'.$row['userid'].'/'.preg_replace('/^.+[\\\\\\/]/', '', $row['path']).'"'."\n"; + $content.='mount --bind "'.$row['path'].'" "/home/ftp/westdc_'.$row['userid'].'/'.preg_replace('/^.+[\\\\\\/]/', '', rtrim($row['path'],'/')).'"'."\n"; } $filename='./proftp-user.sh'; if (!empty($content)) @@ -53,8 +53,4 @@ } pg_free_result($result); pg_close($link); - function get_basename($filename) -{ - return ; -} ?> \ No newline at end of file