URL format with GET parameters?

2020-02-09 06:39发布

问题:

Is there a specification somewhere listing the correct way to pass GET variables to a URL?

Normally I do it like this (first variable indicated by ?, second and subsequent indicated by &:

http://www.mysite.com/mypage.html?var1=value1&var2=value2&var3=value3

Are those ? and & specifically needed, and in those order? Could I eliminate the '?' and pass all variables only with the '&' ?

回答1:

No, how you are doing it is correct.

http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.2



标签: php http