Product automatic connection server-side update ideas, server-side update ideas_PHP tutorial

WBOY
Release: 2016-07-13 09:52:48
Original
822 people have browsed it

The product automatically connects to the server-side update idea, the server-side update idea

The product automatically updates the idea

1. (User) User starts RAW

2. (System) Connect to the server and send the current version number

3. (Server-side) detection data, if it is the latest version, 1 will be returned, otherwise, the following processing will be performed:

Server-side versions are stored in the following format (for example):

ID

Version

Date

Con

1

1.0

2015-1-1

 

2

1.1

2015-1-5

Index.php

3

1.2

2015-2-5

Index.php|O/inc.php

ID

Version


Date

Con

1

1.0

2015-1-1

2

1.1

2015-1-5

Index.php

3

1.2

2015-2-5

Index.php|O/inc.php

For example, the latest version is 1.2, and the version sent by the user is 1.0Processing: Get the ID number corresponding to 1.0 Get the latest version ID number Execute a loop to obtain the Con of each piece of data from 1.0 to the latest version, divide the Con containing | into arrays, and merge them into one array We got such data: Array(0=>””,1=>”index.php”,2=>array(0=>”index.php” ,2=>”O/inc.php”))
Perform dimensionality reduction on this array and obtain an ordinary array: Array(0=>””,1=>”index.php”,3=>”index.php”,4=>” O/inc.php”)
Then remove duplicate arrays and empty arrays Get: Array(1=>”index.php”,4=>”O/inc.php”) Then compress the corresponding files and add a configuration file to store the path of each file After compressing, place it in a public folder and return the path. When a user of the same version requests an update, the above operations will no longer be performed and the download path will be returned directly. http://www.bkjia.com/PHPjc/1007356.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1007356.htmlTechArticleThe product automatically connects to the server-side update idea, the server-side update idea product automatically updates the idea 1. (User) User starts RAW 2. (System) Connect to the server and send the current version...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template