目录后添加"/"符合,以保证页面文件列表能正常显示

This commit is contained in:
wlx 2011-03-04 12:55:46 +00:00
parent b7edd10e2e
commit 5109706a67
1 changed files with 1 additions and 0 deletions

View File

@ -687,6 +687,7 @@ class Admin_DataController extends Zend_Controller_Action
if ($fpath!="")
{
$fdepth=substr_count($fpath,"/")+1;
if ($fdir==1) $fpath.="/";
//print $fsize." ".$fpath." ".$fdir."<br/>";
//$sql="insert into datafile (dsid,filename,filesize,isdir,depth) values(".$dsid.",'".$this->db->escape($fpath)."',".$fsize.",".$fdir.",".$fdepth.")";
$sql="insert into datafile (dsid,filename,filesize,isdir,depth) values(?,?,?,?,?)";