What is wrong with the urlencode direct encoding function?

Source: Internet
Author: User
$ Zhinew_ddStrCode (); echourlencode ($ zhi); this value is different from the following echourlencode (new_ddStrCode (). This value is different from the above one (this value is incorrect) who knows the reason? The above two output values will change in the middle part... $ zhi = new_ddStrCode ();
Echo urlencode ($ zhi); the value is different from the following
Echo urlencode (new_ddStrCode (); this value is different from the above one (this value is incorrect)
Who knows why?
Is the above two output values, the middle part will actually change
Look at the code shown in the figure above. If you write this code, the function output must be the same!
It's okay, because this function is a random change related to time! Not noticed! The final code is found to be 10 minutes faster than the server time, leading to garbled code decoding!

Reply content:

$ Zhi = new_ddStrCode ();
Echo urlencode ($ zhi); the value is different from the following
Echo urlencode (new_ddStrCode (); this value is different from the above one (this value is incorrect)
Who knows why?
Is the above two output values, the middle part will actually change
Look at the code shown in the figure above. If you write this code, the function output must be the same!
It's okay, because this function is a random change related to time! Not noticed! The final code is found to be 10 minutes faster than the server time, leading to garbled code decoding!

Are you sure you generated the same string during the two calls?

Look at the code shown in the figure above. If you write this code, the function output must be the same!
Of course it's different.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.