当我可以使用等效代码时,为什么不应该在文件名中使用空格? [英] Why shouldn't I use spaces in file names when I can use a code equivalent?
本文介绍了当我可以使用等效代码时,为什么不应该在文件名中使用空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我到处都读过,不要在打算用于网络的文件名中使用空格,例如网址。
I've read all over the place NOT to use spaces in file names intended for use on the Web, e.g. URLs.
我不明白使用 %20
替换它们时出了什么问题在我的代码中命名。似乎更适合使用这种替换方式,因为这样我便保留了文件名的语义。
I don't understand what's wrong with using "%20
" to replace them when referring to the name in my code. It seems more appropriate to use this replacement because I'm then preserving semantic meaning of my file name.
?
推荐答案
URL易于阅读。
例如,此页面可能是:
http://stackoverflow.com/questions/1093611/why%20shouldnt%20i%20use%20spaces%20in%20file%20names%20when%20i%20can%20use%20a%20code%20equivalent
乍一看可读性不高。
这篇关于当我可以使用等效代码时,为什么不应该在文件名中使用空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文