Product Automatic connection server-side update ideas, server-side update ideas
Product Automatic Update ideas
1. (user) User initiated raw
2, (System) connection server side, send the current version number
3, (server-side) detection data, for the latest version is returned 1, the reverse is the following processing:
The server-side version is 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 |
For example, the current version is 1.2, the user comes from the version is 1.0
Processing:
Get 1.0 of the corresponding ID number
Get the latest version of the ID number
Execute the loop, get 1.0 to the latest version of each data con, and divide the con that contains | into an array and merge it into one.
You get a data like this:
Array (0=> "",1=> "index.php", 2=>array (0=> "index.php",2=> "o/inc.php"))
This array will be reduced to a normal array of dimensions:
Array (0=> "",1=> "index.php",3=> "index.php",4=> "o/inc.php")
Then remove the repeating array and the empty array
Get: Array (1=> "index.php",4=> "o/inc.php")
Then compress the corresponding file and add a configuration file to store the path of each file.
Compress well and put the path back into a public folder.
When a user of the same version requests an update, the above operation is no longer performed and the download path is returned directly.
http://www.bkjia.com/PHPjc/1007356.html www.bkjia.com true http://www.bkjia.com/PHPjc/1007356.html techarticle Product Automatic connection server-side update ideas, server-side update ideas of product automatic Update Ideas 1, (user) user Start raw 2, (System) connection server side, send the current version ...