php.ini全局变量
As you probably know, the default PHP query string variable separator is the "&" character. One annoyance with using the "&" character is that, in order to have valid XHTML syntax, you need to output your &'s as "&". If you'd like to avoid all of that mess, you can simply change the separating character to a semi-colon (;). Here's how:
您可能知道,默认PHP查询字符串变量分隔符是“&”字符。 使用“&”字符的一个烦人之处在于,为了拥有有效的XHTML语法,您需要将&的输出输出为“&”。 如果您想避免所有此类混乱,只需将分隔符更改为分号(;)。 这是如何做:
PHP (The PHP)
//inside the php.ini file
arg_separator.input = ";"
//example URL: /page.php?key1=value1;key2=value2;key3=value3
There you go -- one easy step to outputting cleaner URLs. Do any of you use this method?
到此为止-输出干净URL的一个简单步骤。 你们中有人使用这种方法吗?
翻译自: https://davidwalsh.name/change-php-query-string-variable-separator-php-ini
php.ini全局变量