Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Zend 语言默认采用这种方式路由 url:
/en_US/mypage /fr_FR/mypage
如何将路线从“en_US”更改为“en”,将“fr_FR”更改为“fr”,例如:
/en/mypage /fr/mypage
您可以通过将其切割为字符串来简单地处理 url。如果它是 。这是简单的 suedocode:
my_url = "http://whatever/en_US/mypage"; first_half = "http://whatever/en"; second_half = "/mypage"; my_url = first_half + second_half;