Php Project packaging method _ PHP Tutorial

Source: Internet
Author: User
Php Project packaging method. We often get some programming activities, such as designing enterprise websites, doing finance, and counting systems. It may be because of a friend's needs. For whatever reason, we often get some programming activities, such as designing enterprise websites, doing finance, and counting systems. It may be because of a friend's needs. For whatever reason. When the program is ready, it is a problem to present and install the program to the other party. Enterprise websites require at least one virtual host. However, OA, finance ...... These internal systems are hard to say. they can't always throw the code and database to others, write a description, let them configure the environment according to the instructions, and install the code. This is obviously not the case. you need to know the line is like a mountain! In addition, if the customer stays 108,000 away from him, he cannot install it in the past. in this case, it is estimated that all the income will not be able to block the fare. Therefore, it is necessary to pack the WAMP environment + PHP program + maintenance installation and uninstallation program into the EXE installation package. It is as simple and convenient as installing QQ to install PHP programs!

There should be more than N methods. I only know three types.

1. use the automatic decompression function of RAR.

2. use the windows package software InstallShield to package the installation package.

3. pack with ready-made items! (Oh, as the saying goes, standing on the shoulders of giants! I am also a lazy .)

The above 1.2 methods can be searched through Baidu and Google. Don't bother searching ...... =. =! More than me ......

Here I will detail my methods. This method was also collected by myself when I helped my friends develop a real estate information system a few days ago.

First, we need a pure green PHP runtime environment. Configure the components according to the project requirements. I use F: \ PHPServer as the environment root directory. generally, apache2 + php5 + mysql5 + zo components need to activate the GD library ...... Configure 80, 3306 ...... You should be familiar with this. You are advised to use a green version of the ZIP format for Integration Suites with strong app customization, such as PHPNOW and XAMPP. Don't worry. the download link will be written below. I use PHPnow, which is small and convenient for customization!

2. install our editing system and check for errors and debug the system. Okay, that's half done. At this time someone spoke, "jianghu Langzhong" "Mongolian doctor" "liar ". Well! Don't worry! At present, the PHPServer folder should ensure that the configuration file is not imported to the outside world. the independence and integrity of the PHPServer must be ensured, that is, the PHPServer should be green.

Third, to these green integration kits, there is usually a good BAT, that is, a batch processing file, directly start the input number to start and close the service. At this time, we can use RAR self-extract + run batch processing, but now we are blocked by a lot of anti-virus software blocking. In fact, I also use this principle. On the Internet, I found a package program make_exe(?phpnow=which can pack the file interface information after .7z + into an EXE running package and automatically run the batch files in the 7z compressed package after self-decompression. Make_exe.zip contains three files: Make_exe.cmd, PHPServer. sfx, and PHPServer. sfx. cf. You should have thought about this. First, compress phpserverinto the phpserver.7z file and configure it. Modify the PHPServer. sfx. cf file and run Make_exe.cmd.

First: Make_exe.cmd code
Set v= 1.2
Copy/B/y PHPServer. sfx + PHPServer. sfx. cf + *. * phpserver?v=.exe | pause
Very clear! "Set v = 1.2" is the version, and then three files are required for packaging.
PHPServer. sfx. cf code. open the method and drag it directly to the TXT file.

;! @ Install @! UTF-8!
Title = "real estate information management system V1.2"
BeginPrompt = "# Real Estate Information Management System V1.2 installation package # \ n * confirm that you have not run other services that Occupy port 80, such as IIS. \ N * if you have other similar packages installed, stop or uninstall them first. \ N * Do not move the installation directory after installation. \ N author: Yuno QQ: 110026985 home page http://www.xilo.cn </a>. "
ExtractDialogText = "please wait and unzip the file ..."
ExtractTitle = "extracting ..."
ExtractPathText = "select the extract path (only English characters ):"
ExtractCancelText = "cancel"
CancelPrompt = "are you sure you want to exit? "
GUIFlags = "4 + 8 + 32 + 64 + 256 + 2048"
InstallPath = "D: \ PHPServer"
RunProgram = "cmd/c setup. cmd"
;! @ InstallEnd @!
I don't need to explain these questions. I can change them if I want to display them. Note that InstallPath = "D: \ PHPServer" is the installation directory, and RunProgram = "cmd/c setup is also run after decompression. cmd "this BAT, that is, the command to start apache and mysql services. The following is the setup. cmd command of PHPServer. Because there are too many simple comments!


@ Echo off
Rem -- the http://www.xilo.cn </a>
Rem -- By Yuno (QQ: 110026985)
Setlocal enableextensions
Call Pn \ config. cmd
Prompt-$ g
Title initialize PHPserver % pnver %-Apache + PHP + MySQL
Echo ____________________________________________________________
Echo ^ |
Echo ^ | ###### installing Haobo real estate information management system environment suite #######^ |
Echo ^ | ____________________________________________________________________ ^ |
Echo.

: Copy
Echo ____________________________________________________________
Echo ^ |
Echo ^ | start file processing... ^ |
Echo.
Rem create Directory
If not exist % apadir % \ conf \ extra md % apadir % \ conf \ extra
If not exist % apadir % \ logs md % apadir % \ logs
Omitted ............
Omitted ............
All files will be attached below! The simple explanation is configuration, copy, and start! I will explain it downstairs.
Texture:

Step 1:
Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = 'hand'; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "onclick =" if (! This. resized) {return true;} else {window. open (this. src);} "alt =" "src =" http://www.bkjia.com/uploads/allimg/131016/06430112b-0.jpg "onload =" if (this. width> 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 2:

Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = 'hand'; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "onclick =" if (! This. resized) {return true;} else {window. open (this. src);} "alt =" "src =" http://www.bkjia.com/uploads/allimg/131016/0643014537-1.jpg "onload =" if (this. width> 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 3:

Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = 'hand'; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "onclick =" if (! This. resized) {return true;} else {window. open (this. src);} "alt =" "src =" http://www.bkjia.com/uploads/allimg/131016/064301I64-2.jpg "onload =" if (this. width> 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, it's okay. I believe everyone understands it. the first time I posted a technical post, it's a little too good! Haha! If it is complete, uninstall the command! Back up the database! Add it to STARTMENU! It's easy! The last point is that all resources come from the internet. I hope the software author will not bother me!
Post link !!!
1. official PHPnow
2.Make_EXE.zip
3. Simplified setup. cmd
4.7z is very powerful!

Bytes. It may be because of a friend's needs. For whatever reason...

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.