UrlEncode Direct coding function What's wrong?

Source: Internet
Author: User
$zhi =new_ddstrcode ();
echo UrlEncode ($zhi); This is not the same value as below.
Echo UrlEncode (New_ddstrcode ()); This value is not the same as above (this value is wrong)
Does anyone know why?
is the above 2 output values, the middle part actually will change
Look at the code above, so write, the function output must be the same bar!
It's okay, because this function is a random change of time! Didn't notice! The last code check out is the server time 10 minutes faster, resulting in decoding out garbled!

Reply content:

$zhi =new_ddstrcode ();
echo UrlEncode ($zhi); This is not the same value as below.
Echo UrlEncode (New_ddstrcode ()); This value is not the same as above (this value is wrong)
Does anyone know why?
is the above 2 output values, the middle part actually will change
Look at the code above, so write, the function output must be the same bar!
It's okay, because this function is a random change of time! Didn't notice! The last code check out is the server time 10 minutes faster, resulting in decoding out garbled!

Are you sure you generated the same string two times as you called it?

看上面图的代码,这样写,函数输出肯定一样的吧!
Of course not.

  • 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.