duan2428 2017-10-02 10:21
浏览 151
已采纳

PHP urlencode版本之间的差异

When I use urlencode() on the same string containing special characters in PHP7 and PHP 5.3.10, the results are different.

What I tried:

urlencode('Testör')

Output in PHP7: Test%C3%B6r

Output in PHP 5.3: Test%25C3%25B6r

Could someone explain what the %25 leading in the older PHP version is?

  • 写回答

1条回答 默认 最新

  • douerqu2319 2017-10-02 10:23
    关注

    It looks to me that you've URL encoded it twice in the 5.3 output. %25 stands for %. Which is missing around the C3.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?