在字符串中实现右边目录符号支持
This commit is contained in:
parent
be649e1be8
commit
7872226002
|
@ -37,7 +37,7 @@
|
||||||
$row = pg_fetch_array($result, $ri);
|
$row = pg_fetch_array($result, $ri);
|
||||||
$content.='# path: '.$row['path']."\n";
|
$content.='# path: '.$row['path']."\n";
|
||||||
$content.='mkdir -p "/home/ftp/westdc_'.$row['userid'].'/'.basename($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';
|
$filename='./proftp-user.sh';
|
||||||
if (!empty($content))
|
if (!empty($content))
|
||||||
|
@ -53,8 +53,4 @@
|
||||||
}
|
}
|
||||||
pg_free_result($result);
|
pg_free_result($result);
|
||||||
pg_close($link);
|
pg_close($link);
|
||||||
function get_basename($filename)
|
|
||||||
{
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue