PHP usage Analysis for ENCODE64 encoding

Source: Internet
Author: User
Encode64 can obtain the shortest 26 English-size alphanumeric plus "-_" two symbols encoded data, the string can be transmitted freely in the network, without regard to the confusion caused by automatic transcoding. Cons: For large strings too slow, the reason is unclear, maybe the php script itself is slow, so it built a lot of functions, these functions if the implementation of the script is intolerable. And JavaScript doesn't have this problem, the script is much faster

The first step, first download the PHP Encode64 Encoding class Library We need: http://www.php.cn/xiazai/leiku/806

The second step, download the completion of the required PHP class files, unzip the value of the local directory, create a new PHP file ~

The third step, in the new file, we want to call this class, and instantiate this class:

<?phpinclude_once "code64.php"; Introduce class file $obj = new Encode64;       Instantiate this class of $str = "      //define variable echo $obj->code ($STR);    Output?>

Run this file and get the results as shown:

Attention:

In this case, we just use one of the classes as a guide, the rest of the examples of small partners can do their own try!

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.