Currently I'm working on a "plugin" that will be installed on many different sites and I was wondering on the best way for me to maintain the file version of this "plugin".
Here's what I was thinking. Have a "master copy" of the plugin on a server, then connect via FTP to the target sites and upload the copy to their site overwriting whatever files they may have.
I was wondering the best way to go about this.
The "plugin" will have many different folders and files so transferring one file at a time will be too ted开发者_JS百科ious. Is there a way to copy an entire folder over at a time?
Or even better, is there a way to recurse through the folders and checking for file difference before uploading the new file? This is to make sure we are uploading a new file and not just the same one.
I recommend using a source version control system like git or subversion.
For transferring multiple files, you could use PHP's zlib functions. Then you could have the clients extract the archive when it arrives.
精彩评论