3rd WeChat mall ECs background Creation

Source: Internet
Author: User
Tags svn client

I. Apply for server resources

To develop a backend server program, we must first apply for server resources. There are currently many cloud servers available, such as Sina's sae. Here we will take sae as an example.

1. Open http://sae.sina.com.cn.

2. Click Create Application

3. Fill in the second-level domain name, application name, verification code, select the development language as php, select the application type as web application, and click Create application.


4. Click the "select development framework" tab and select "public platform php sdk ".

5. Click "Install framework" on the pop-up page, enter necessary information, and click "Install to the above position".


6. Click "manage installed applications" after a prompt is displayed. We can see that the application has been successfully created and you are assigned an acces key and secret key.


Through the above steps, we already have a basic background server framework, but this framework does not have any function yet. Next we will associate this background with our account, and develop some practical functions in this background.

 

2. Configure the account

Next, we will associate the background of our sae with our number. First, log on to your account and click: advanced features-go to development mode-become a developer. My account is an unauthenticated subscription account, for example:

 

Next, we need to write a php Access Program and upload it to the background space on the sae for access verification.

The access program is very simple and has been explained in detail in the previous tutorial.

 

Upload the file (see Attachment) to the sae server. We will introduce how to upload code files to sae.

First, sae uses the svn tool for code management, and svn is a version management tool.

1. Download the svn client tool.


2. After the installation is complete, Create an empty directory on the local computer, right-click the empty directory, and select TortoiseSVN-Create Repository Here.

3. Click code management on our sae interface to view the svn repository address:


4. Right-click the directory in step 2, select svnchekout, enter the svn repository address in the previous step, and click OK. Enter our sae account and password and click OK. In this way, we will download the code on sae to our local device.


5. OK. Copy the code of the access verification file to the downloaded index. php file of version 1 to overwrite the original content.

6. Right-click the modified index. php file, select SVN Commit, and click OK to submit the file to the corresponding directory on sae.


7. log on to the sae management platform and click Edit code.


8. On the open code editing page, double-click index. php to check whether the code is updated.


9. log on to our public platform account, and enter our background url in the access verification input box, for example, mywxsvr.sinaapp.com and Token, the Token value is the string defined in the access program that we just uploaded to sae, for example, weixin .,


Click the submit button to pass access verification.

 

Note: our public account has successfully established a connection with the background program on the sae, and we can use the basic interface in the sae background program for programming.

 

In this lecture, we will review the main content of this lesson. In this lesson, we use sae as our server background program, it also details how to complete access verification by communicating with the sae background Access Program on the platform. After the access verification is completed, we can use our imagination, many interesting and practical functions are programmed using platform interfaces in the sae background.

 

Related Article

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.