PHP WeChat Public number development model detailed _php example

Source: Internet
Author: User
Learning steps: Four chapters to tell this part of the content, the following is the general content of each chapter.

1, understand the development mode and editing mode, some preparation before development.
2, the development mode user, server, personal server is how to interact. What is an interface.
3. The invocation and implementation of various interface functions.
4. Call of JS-SDK

The public number is developed in two modes: edit mode and development mode. Editing mode is simple, you do not need to manipulate any code, only need to use the functionality provided to manage their own public number. This way the development of the page is relatively simple, mainly for the implementation of the article push and other functions. The developer mode enables more powerful functions, such as the payment of calls, through its own backend server, and with the attention of the user. Here we mainly explain the developer mode of the public number.

Preparatory work:

1, their own background server. I used the Sina cloud SAE service to upload my code to the server via SVN.
1.1 Build server operations on Sina Cloud. Login Link: http://www.sinacloud.com/?from=sogou_web

Access to Application Management


Click Create New App


Deploy the environment settings, as follows.


The operating environment chooses a standard environment because the standard environment has a free quota of 5G.
SVN code is easier to manage than git.
Enter the project after a successful creation


Select the code management under the app


The SVN repository information will be used later on the PC for deployment.
Click Create version

2. Use SVN to manage code.

What is SVN? Once you've created an app on the SAE, you'll have a warehouse address to store your code. The warehouse address for the SVN warehouse information in Sina cloud-5. When you install SVN on your PC, you can define a warehouse on your PC via SVN, and all the code in this repository can be submitted to the server SVN repository by "svn commit", so that the server code can be updated synchronously. You can also "SVN update" way to update the code on the server to the PC, convenient for many people to the server code editing.

SVN download Address: http://www.sinacloud.com/doc/sae/tutorial/code-deploy.html
After successful installation:
The Desktop right-click menu will appear as two options in the box.


Create a folder at any location on your computer. Select the folder right and select SVN checkout in the menu and the interface will appear:


This is equivalent to building a warehouse, and the remote server's warehouse want to connect, the code can be in between the two warehouses with the SVN way to pass.
If you set up a PHP file in your local repository, you want to upload it to the server repository. Select the file and right-click on SVN commit.
If you want to pull files from the remote server repository to the local server repository. Select the folder or go inside the folder and right-click the SVN update.

3, public platform, login after entering the developer mode.

Find the public platform test account on the page and click Enter. Another login page will appear, with your sweep to enter. (the test numbers for each of the public platforms are bound to be used for administration by number of numbers).


The above is the whole content of this article, I hope that everyone's learning has helped, but also hope that we support the script home.

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