In our lives still become one of our main contact, of course, the function of the red envelope is most popular, and now send red envelopes more popular, we will use the red envelopes, PHP generated Red envelopes class, through the parameters of the class control, generate different red envelopes, easy to operate, flexible application to the project.
First download the PHP that we need to use in this lesson to generate a red Envelope class library: http://www.php.cn/xiazai/leiku/641
After the download, find the PHP class files we need, unzip to our local directory, create a new PHP file!
Once this is done, we will invoke this class in the new PHP file, and instantiate the class:
<?phpinclude_once "weixin.php";//Introduction class file $data = Getredgift (100, 10);//100-bit amount 10-bit Red packet number Print_r ($DATA);? >
Run this file and get the results as shown:
Attention:
Here we do not refresh the page, the information will be different!