如何在文件名中而不是在URL中编码正斜杠(/)?
我无法在网上找到有关文件名的任何内容,只有网址。
此外,我不想在1/2盎司上使用0_5_oz或其他替代品。
For example: http://lemon_1/2_oz.php
http://lemon_1%2f2_oz.php resolves as http://lemon_1%2f2_oz.php (creates and error)
http://lemon_1∕2_oz.php resolves as http://lemon_1/2_oz.php (also fails)
I tried the following character replacements and both failed:
ASCII UTF-8: %2f
Unicode Character HTML Entity (decimal): ∕
Other options, but I also think they will fail"
/
/
/
Thank you
答案 0 :(得分:0)
您不能在通过查询字符串检索文件的文件名中使用正斜杠。浏览器会选择这个并希望找到一个网页。同样,如果您将此用于文件路径,您也会遇到问题。
其他不可用的字符包括(窗口):
\ / : * " < > |