PHPxref usage guide_PHP tutorial

WBOY
Release: 2016-07-13 17:35:55
Original
1042 people have browsed it

PHPXref is a very excellent PHP development tool. It can classify and record all the functions, variables, constants, etc. in a certain program (such as WordPress) and generate an HTML web page list. You can easily add it here Find in the list where a function is defined and where it is referenced. This is very useful for both a WordPress plug-in developer and people who want to learn and study WordPress.
PHPXref officially has a prepared analysis document for WordPress: http://phpxref.com/xref/wordpress/. In addition, PHPXref has also produced analysis documents for various PHP programs. If you are interested, you can search on the Google site one time.

PHPXref’s main features include

1. File management. No matter what file you are looking for, you can use it to search it quickly. If your file has comments that comply with grammatical rules, PHPXref can also list it next to the file name, making it easier to understand the function and purpose of the file. Searching through the entire folder to find a file, opening each file and looking for comments.

2. Function, variable, constant, and class management. Wordpress has a variety of powerful built-in functions and classes. Whether it is character processing or remote URL reading, there are ready-made functions, but we often don’t know that this function can be found in WordPress. Now it is much easier. You can find it by searching. Well, if you encounter a certain WordPress function during the development process and don’t know what it is used for, then you have to find where this function is defined. But where can you find the hundreds of files in WordPress? It's better to use PHPXref.

3. File inclusion management. Wordpress requires a lot of include, and require includes other files, but occasionally repeated inclusions lead to errors. Although require_once can solve the problem, it is also best to know which files are included in a script, and keep this in mind when calling this file. There are several. PHPXref provides a list of included files and included files for each file.

4. Source code highlighting. This function is also relatively practical, but errors occasionally occur in actual tests.

5. Excellent correlation function. When browsing the source code, point the mouse to a function name, and the definition page of the function will appear next to the mouse, as well as the number of times it has been used. In addition, for frequently used variable names, you can also directly have a page to display all of them. About the usage of this variable.

Since PHPxref is so powerful, how to use it?

1. First, download the latest program from SF. The current version is 0.7. Just download the win32 version. After downloading, unzip it.

2. There is a source folder under the phpxref directory. This is the folder where the source code is stored. Put the WordPress source code you downloaded here. Please be careful not to put the entire wordpress/ directory. Just put the files inside. Make sure they are in the format of source/index.php, source/wp-content/..

3. Run the executable file phpxref.exe to generate the document. This process takes about 1 minute. Due to the high frequency of reading the hard disk and the large amount of calculations that consume CPU resources, please suspend other work.

4. After the prompt is successful, all documents will be in the output directory. It is recommended to use XAMPP for debugging locally, move the entire output folder to the htdocs directory of xampp, and then change the name to something easy to remember. phpxref, so it can be accessed through http://localhost/phpxref/. The effect is exactly the same as http://phpxref.com/xref/wordpress/, of course, the speed is much faster.

PHPXref also provides a version that generates documents under Linux, but I rarely use Ubuntu and have not tested it under Ubuntu. I think most people need it under the Win system. If necessary, use the Win system. The documents generated can be moved to the server for everyone to access, and you can also put some Google Adsense ads under the page to earn some extra money. However, the document generated by PHPxref is too large. A 1.2MB WordPress (compressed package), after decompression and then generating the document, actually takes more than 80 MB! After compression, it needs to be close to 20MB, so I gave up the desire to put it on my own server (perhaps making duplicate images will be punished by search engines).

In addition to using PHPXref to generate existing WordPress or other PHP demonstration programs (such as Discuz) for learning, it is also useful to use PHPXref to generate your own PHP programs to check errors or organize code resources. Since I learned PHP, I have written about 5 relatively large programs (I think they are relatively large, but none of them are commercial products). I have written almost 5 times of email address verification function, username verification function, password Verification functions, MySQL classes... It seems that PHPXref must be used to organize resources.

Before using PHPxref, I also read the introduction provided by awflasher.com, thank you very much.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508259.htmlTechArticlePHPXref is a very excellent PHP development tool that can combine all the functions in a program (such as WordPress) , variables, constants and other classified records to generate a list of HTML web pages, you can...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!