split path to folders

pull/72/head
qkqpttgf 2020-05-22 16:05:12 +08:00 committed by GitHub
parent ca75c22de1
commit c8a9540d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 5 deletions

View File

@ -2225,6 +2225,25 @@ function render_list($path = '', $files = '')
}
$html .= $background . $tmp[1];
$tmp = splitfirst($html, '<!--PathArrayStart-->');
$html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--PathArrayEnd-->');
$PathArrayStr = $tmp[0];
$tmp_path = str_replace('%23', '#', str_replace('&','&amp;', $path));
$tmp_url = $_SERVER['base_disk_path'];
while ($tmp_path!='') {
$tmp1 = splitfirst($tmp_path, '/');
$folder1 = $tmp1[0];
if ($folder1!='') {
$tmp_url .= $folder1 . '/';
$PathArrayStr1 = str_replace('<!--PathArrayLink-->', $tmp_url, $PathArrayStr);
$PathArrayStr1 = str_replace('<!--PathArrayName-->', $folder1, $PathArrayStr1);
$html .= $PathArrayStr1;
}
$tmp_path = $tmp1[1];
}
$html .= $tmp[1];
$tmp = splitfirst($html, '<!--SelectLanguageStart-->');
$html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--SelectLanguageEnd-->');