PHP Project Packaging Method _php Tips

Source: Internet
Author: User
Tags rar
People often receive some programming work, such as designing corporate websites, doing financial, statistical systems, and so on. Perhaps because of the needs of friends, perhaps a pocket money. No matter what the reason. And so the program is done, to show the other side, installation, became a problem. Enterprise Web site to say, at least need a virtual host something, but OA, financial ... These internal systems are not easy to say, can not throw the code and database to others, write a description, let them follow the instructions to configure the environment, install the code. This is obviously outrageous, you know interlacing as Foster Ah! Furthermore, in case the customer is 108,000 miles from where he is staying, it is not possible to install it in the past, thus estimating that all income will not be able to block the fare. Therefore, the WAMP environment +php program + maintenance of loading and unloading program into an EXE installation package is necessary. To allow customers to install the PHP program is as simple as installing QQ, convenient!

There should be n multiple methods. All I know is that there are only three kinds.

1. Use RAR automatic decompression function.

2. Use Windows packaged software InstallShield to make installation package.

3. Pack with the ready-made stuff! (hehe, as the saying goes, standing on the shoulders of giants!) I am also a lazy man. )

Above 1.2 methods, we can through Baidu, Google search. Don't bother searching ... =.=! than I am.

Here, I'll give you a detailed look at my method. This method is also a few days ago to help friends to do a real estate information system when they collected.

First, we need a pure green PHP operating environment. The components are configured first according to the requirements of the project. I am using F:\PHPServer as the Environment root directory, general component Apache2+php5+mysql5+zo need to open GD library ... Configure 80,3306 ... This one should be more familiar than I am. You can apply a more customized integration suite preferably in a zip format, such as PHPNOW,XAMPP. Don't worry, the download link will be written below. I use the Phpnow, small and convenient customization high!

Second, we set up the system installed, their own error debugging, all OK after. Well, that's half done. At this time, someone said, "quack", "Mongolian Doctor" "Liar." Well! Don't worry, everyone, the show is behind you! Now this folder Phpserver, to ensure that you do not import configuration files to the outside world, we must ensure that phpserver independence and integrity, is to ensure its green.

Third, to these green integration kits generally have a written bat is a batch file, the direct launch of the input number can start and turn off the service. At this time we can use RAR self-extracting + run batch processing, can, but now by a lot of anti-virus software blocked interception. In fact, I use this principle. I found a packaging program on the Internet Make_exe (from Phpnow) can put the. 7z+ Package of file interface information into an EXE run package, and automatically run the self-extracting 7z compressed package of batch files. There are make_exe.cmd,phpserver.sfx,phpserver.sfx.cf three files in the Make_exe.zip bag. See this, we should have a train of thought. First, press Phpserver into phpserver.7z file and configure it. Modify the PHPServer.sfx.cf file, and then run Make_exe.cmd on it.

First: Make_exe.cmd code
Set v=1.2
copy/b/y Phpserver.sfx + PHPServer.sfx.cf + *.* Phpserver%v%.exe | | Pause
It's clear! "Set v=1.2" is a version, and then requires three files, packaged.
PHPSERVER.SFX.CF code, open method, drag directly to TXT on the line

;! @Install @! utf-8!
Title= "Real Estate Information management system V1.2"
beginprompt= "# Real Estate Information Management System V1.2 installation package #\n\n * Verify that you are not running other 80 port-consuming services such as IIS. \ * If you have other similar kits installed, please stop or uninstall first. \ n * Please do not move the installation directory as soon as the installation is complete. \ n \ nthe author: Xilo qq:110026985 homepage <a href= "http://www.xilo.cn/" >http://www.xilo.cn</a>. "
Extractdialogtext= "Please, unzip the file later ..."
Extracttitle= "is decompressing ..."
extractpathtext= "Please select the decompression path (English characters only):"
Extractcanceltext= "Cancel"
Cancelprompt= "Do you really want to quit?"
Guiflags= "4+8+32+64+256+2048"
Installpath= "D:\\phpserver"
runprogram= "Cmd/c setup.cmd"
;! @InstallEnd @!
I do not need to explain these, I want to show what to change. Note that this sentence installpath= "D:\\phpserver" for the installation directory, and decompression after the operation runprogram= "cmd/c setup.cmd" This bat, that is, the command to start apache,mysql services. Here is the order of Phpserver's setup.cmd. Because too many simple stick a few words!


@echo off
REM--<a href= "http://www.xilo.cn/" >http://www.xilo.cn</a>
REM-by Xilo (qq:110026985)
Setlocal enableextensions
Call Pn\config.cmd
prompt-$g
Title Initialize Phpserver%pnver%-Apache + PHP + MySQL
Echo ____________________________________________________________
Echo ^| ^|
Echo ^| ###### is installing the Ho Bo Real Estate Information Management System Environment Kit ###### ^|
Echo ^|____________________________________________________________^|
Echo.

: Copy
Echo ____________________________________________________________
Echo ^| ^|
Echo ^| Start file processing ... ^|
Echo.
REM Build Directory
If not exist%apadir%\conf\extra MD%apadir%\conf\extra
If not exist%apadir%\logs MD%apadir%\logs
Omitted............
Omitted............
All the documents will be attached below! The simple explanation is configuration, replication, startup! I don't know, I'll explain it downstairs.
Map:

First step:
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>
Step Two:

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>

Step Three:

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>

Actually already OK, I believe we also understand, the first technical post a bit too Tang's monk! Haha! If in perfect words is uninstall command Ah! Backup DATABASE Ah! Add it to the StartMenu! It's all very simple! Finally, the statement that all resources are from the Internet, I hope the software authors do not bother me ah!
Post LINK!!!
1.PHPnow the official
2.make_exe.zip
3. Streamlined Setup.cmd
4.7z is very powerful!

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.