Getting started with configuring Editplus to debug PHP programs

Source: Internet
Author: User
Tags php website

 

I have introduced the PHP development tool zend studio7 getting started tutorial. zend studio 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 Editplus is configured, PHP website development is not inferior to zend studio. Editplus provides many user tools (plug-ins), such as PHP Automatic completion and PHP function Automatic reminder and completion, these are all convenient for configuring 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.

Related Article

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.