本文介绍了为什么是“%2E”出现而不是点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的ASP页面正在做一些奇怪的事情,我认为它与 有关,%2E替换了文件名中的点但是另外,如果我右键单击 链接并选择另存为,文件扩展名重复为 " Week20.pdf.pdf" 这里是相关信息: <% set directory = server.createobject(" scripting.filesyste mobject") set allfiles = directory。 getfolder(server.mappath(" / MMM / Lesson /")) ''列出目录中找到的所有文件 对于allFiles.files中的每个目录文件 %> < a href = MMM / Lesson /<% ''写出文件名称 response.write server.urlencode(directoryfile.name)%>><% response.write directoryfile.name%> < / a> 这就是它在已发布页面的来源中显示的结果 < a href = MMM / Lesson / Week20%2Epdf> Week20.pdf < / a> %E2这是我以前从未注意过的事情。 代码是否合适? 重复的扩展名怎么样?My ASP page is doing something wierd, I think it has something to do withthe %2E replacing the dot in the file name But in addition, if I right clickthe link and select "save as", the file extension is duplicated as"Week20.pdf.pdf"here is the relevant info:<%set directory=server.createobject("scripting.filesyste mobject")set allfiles=directory.getfolder(server.mappath("/MMM/Lesson/"))'' Lists all the files found in the directoryFor each directoryfile in allFiles.files%><a href=MMM/Lesson/ <%'' Write out the name of the documentresponse.write server.urlencode(directoryfile.name) %>><%response.write directoryfile.name %></a>This is how it turns up in the source of the published page"<a href=MMM/Lesson/Week20%2Epdf>Week20.pdf</a>The "%E2" is something I never noticed before.does the code look right?what about the duplicated extensions?推荐答案 这篇关于为什么是“%2E”出现而不是点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 17:19