Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一个关于目录的bug #7

Open
zhouguangyou1994 opened this issue Mar 30, 2017 · 2 comments
Open

发现一个关于目录的bug #7

zhouguangyou1994 opened this issue Mar 30, 2017 · 2 comments

Comments

@zhouguangyou1994
Copy link

发现一个关于目录的bug,不知道是不是只有我是这样,就是如果目录前面带#号的话,会出现目录下的文件无法下载,点击下载直接回到主页,如目录名:#最新版。

希望作者可以测试一下,本人来自LOC论坛

@maysrp
Copy link
Owner

maysrp commented Mar 31, 2017

# 识别为位置标识符。

@maysrp
Copy link
Owner

maysrp commented Mar 31, 2017

function download($file){
                        $file=str_replace('#','%23',$file);//只添加该行
                        return "<a href=\"".$file."\" ><span class=\"glyphicon glyphicon-download-alt\"></span></a>";
                }

download方法换成以上方法,
原理把#替换为%23即可;
-奇怪,urlencode用了居然无法下载,暂时先这样了-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants