Previously, I introduced the PHP development tool zendstudio7 getting started tutorial. zendstudio is actually very memory-consuming. for beginners of PHP, I will share with you how to configure Editplus to debug the PHP program today, after configuring Editplus for PHP website development, I did not introduce the PHP development tool zend studio7 getting started tutorial before zendstudio. the use of zend studio is actually very memory-consuming. for beginners of PHP, today, I will share with you how to configure Editplus to debug the PHP program. after Editplus is configured, PHP website development is not inferior to zend studio. Editplus provides many user tools (ins ), for example, PHP automatic completion, PHP function automatic reminder, and completion all facilitate the configuration of Editplus to debug the PHP program. next I will introduce the configuration steps of Editplus in the form of a PHP Tutorial.
Preparations
Before configuring Editplus to Debug PHP, you must first download Editplus. you can download Editplus from the Editplus official website. However, if you download Editplus from the official website, you need a registration code in English and no Chinese version, you can search by Editplus Chinese version as the keyword on the internet. I downloaded the EditPlus v3.12 Build 581 Chinese version. As for the registration code, you can search it online.
In addition, you need to install and configure the PHP runtime environment.
Step for configuring Editplus to debug the PHP program
Before using Editplus to Debug PHP, we need to create a new PHP project to facilitate PHP file management.
Step 1 of configuring Editplus to debug the PHP program: Use Editplus to create a project,
Configure Editplus to create a PHP project
First, click Add project to name the project, such as leapsoulcn, and then click add project to specify the specific PHP program file directory. When debugging PHP, the difference between Editplus and zend studio is that the URL directory address of Editplus debugging is the specified directory address, which is irrelevant to the project name.
The project management function of Editplus is very weak, and it feels a bit false. the directory on the left does not list the newly created Project. You still need to manually select the specific directory of the project, in addition, you can select a new project from the menu bar project | select a project, and the selected project appears at the bottom of the project menu. click it to open all the files of the project. If you want to debug the PHP file separately, you can also click add file, but the general feeling is that Editplus does not have zend studio intelligence in this regard, which also makes debugging PHP inconvenient.
Step 2 of configuring Editplus to debug the PHP program: Set the server address and directory,
Configure the PHP program access address (Url) and Directory
To use Editplus to develop and debug a PHP program, you must check the execution status of the PHP program page. we need to configure the host name and PHP program directory through Editplus. First, select the menu tool | preferences, and then click add, enter the localhost and PHP program directory addresses in the host name and root directory respectively.
At the same time, Editplus sets the IE browser by default. you can also select FireFox Netscape 4 Opera or another browser, such as Google Chrome, but you need to specify the specific location of the program. After the configuration is complete, save and open a php file. press Ctrl + B to access the file in the browser.
Step 3 of configuring Editplus to debug the PHP program: Configure the PHP help manual and plug-ins
The configuration of the user tool plug-in is mainly implemented through the Editplus user tool. Editplus provides 10 sets of user tool Groups. you can place tools of the same nature in one group and re-execute this group. The user tool group is used as follows:
Select menu tool | user tool group | a specific tool group (for example, tool group 1 is a help document and PHP help document is added to this tool group ), all the tools in this tool group are listed at the bottom of the tool menu. when the first tool is called, press CTRL + 1. when the second and third tools are called, press CTRL + 2, CTRL + 3, and so on. The following describes how to add tool plug-ins and how to use them.
1. configure the PHP help Manual
For PHP website development, it is essential to check the PHP help manual. Editplus provides the PHP help manual in CHM format and configures
Use Editplus to configure the PHP help Manual
Click "user tool". the default Editplus group name is Group1. click the group name. I rename it as a help document and click "Add tool". there are four formats of "Editplus": Program, help File (*. hlp), HTML Help File (*. CHM), press the key to record, and select the HTML Help File (*. CHM), enter php manual in the menu text, and select the specific storage location of the CHM file as the file name.
When you use Ediplus to debug or compile a PHP program, select the specific function name and press CTRL + 1. Editplus will automatically open the PHP help manual and jump to the selected PHP function description document page. Download PHP help documentation
2. configure the PHP debugging tool-syntax check
The logging command is also very powerful.
Editplus configure PHP syntax check tool
To specify the location of php.exe, enter-f as the parameter, and click the file path in the right triangle. Note that double quotation marks are added. Select the file directory for the initial directory. When using this function, you only need to select the debugging plug-in tool group and press CRTL + 1. Editplus will debug the PHP program in DOS mode and output the execution results of the opened PHP file. if there is a syntax error, an error message and the number of rows will appear in the last row.
2. configure the PHP debugging tool-function description
In addition to the introduction, you can use editplusto configure the PHP help manual, and use php.exe to output the description of the function,
Editplus PHP function configuration tool
Input the-rf parameter and select the currently selected content in the right triangle. when using Editplus to debug the PHP program, select the specific function name, press CRTL + 2, editplus outputs the description of the selected function in DOS mode.
Step 4 of configuring Editplus to debug the PHP program: Set the PHP automatic completion function
PHP developers who have used zend studio will know that zend studio is very intelligent. when you enter a part of the PHP statement or function, zend studio will provide the corresponding information and choose one, you can automatically complete all the syntax formats of PHP statements or functions. you only need to fill in the code block or parameters, which is very convenient. Because the php acp file is relatively new.
After downloading the automatically completed PHP rule file of Editplus, decompress the file and place the php acp file in the installation directory of Editplus, and set the PHP automatic completion function,
Configure the PHP automatic completion function of Editplus
Select Settings and syntax on the left, set file type to PHP on the right, and click... Select php. acp to automatically save the rule file. if you do not want to use the automatic completion function of Editplus, you only need to check and disable the automatic completion function. Restart Editplus to use it.
When using the PHP auto-completion function of Editplus, be sure to enter the complete PHP statement or PHP function in the PHP file, and then press a space to start the auto-completion function. if only one part is entered, pressing spaces does not enable the function of automatically completing Editplus PHP.
Step 5 of configuring Editplus to debug the PHP program: Set the PHP function reminder function
This step is actually a complementary function automatically completed by the function when debugging PHP using Editplus. when you cannot remember the specific function name, the function reminder function is very necessary.
First, download the material file, that is, the php. ctl file. Then, place the decompressed php. ctl file in the Editplus installation directory, select the material file on the left, right-click and refresh it. When you want to use the PHP function reminder function of Editplus, you only need to select the corresponding PHP material File, enter a part of the function name in the PHP file, and then press F2, the corresponding functions will be listed in a fuzzy manner, and you can finally select the PHP function you need.
OK. Now all the steps for configuring Editplus to debug the PHP program are described. After configuring the above steps, you can use Editplus to compile and Debug PHP. Of course, if you have a certain foundation, you can also sort out the php. ctl file, or sort out the PHP automatic completion rule file acp based on your usage habits. In general, the configuration of Editplus is very flexible, and the advantage of being a lightweight PHP development tool is quite obvious.