phpf防止越权下载文件
if (file_exists($sFilePath)) {
$sTitle = $sFilePath;
$sTitle = strrchr($sTitle, "/");
$sTitle = ltrim($sTitle, '/');
$this->downloadFile($sTitle, $sFilePath);
}
其实就是切割 如用户上传路径可能是 /Data/wwwroot/edu/xxx/bbb 这时我们只需要bbb,切割符合的就行了

浙公网安备 33010602011771号