你如何逃避/
VBScript中的正斜杠字符()?例如,在以下字符串中:
bob = "VU administration/front desk"
Joel Coehoor.. 12
你没有逃脱它:它并不意味着php或vbscript中有任何特殊之处,因此不需要进行转义.你需要在vbscript中逃脱的唯一一个字符是双引号,它会逃脱:
MyString = "He said, ""Here's how you escape a double quote in vbscript. Slash characters -- both forward (/) and back (\) -- don't mean anything, even when used with common control characters like \n or \t."""
类似地,在php中,反斜杠会自行转义,但正斜杠不需要任何特殊处理.
你没有逃脱它:它并不意味着php或vbscript中有任何特殊之处,因此不需要进行转义.你需要在vbscript中逃脱的唯一一个字符是双引号,它会逃脱:
MyString = "He said, ""Here's how you escape a double quote in vbscript. Slash characters -- both forward (/) and back (\) -- don't mean anything, even when used with common control characters like \n or \t."""
类似地,在php中,反斜杠会自行转义,但正斜杠不需要任何特殊处理.