Php document tool PHPDocumentor installation and use method, _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Php documentation tool PHPDocumentor installation and use ,. Php documentation tool PHPDocumentor installation and use methods, this article describes the php documentation tool PHPDocumentor installation and use methods. For your reference, see PHPDocum php document tool PHP Documentor installation and usage,

This article describes how to install and use php pluentor. We will share this with you for your reference. The details are as follows:

PHP pluentor is a module under PEAR used to generate documents. The PHP generator entor scans the php source code under the specified directory, scans the keywords, captures the comments to be analyzed, analyzes the specific tags in the comments, and generates html files, then, based on the analyzed class and module information, create an index to generate an html file. It is useful in review code.

1. install PHP pluentor

First, check whether the pear Library is installed,

; UNIX: "/path1:/path2" include_path = ". :/usr/share/pear "// pear Library location; Windows:" \ path1; \ path2 "; include_path = ".; c: \ php \ shortdes"

If http://pear.php.net/go-pearis not installed, the file region is bytes. The php go-pear.php under the command line, you can install. I installed php with yum. during installation, pear has been installed. After installing pear, you can install phpdoc through pear install phpDocumentor.

[Apacheuser @ krlcgcms01 ~] $ Phpdoc-h contains many parameters. to generate an html document, three parameters are enough.

-D directory to be analyzed. multiple directories are separated by commas.
-T: storage path of the generated document
-O output document format

II. production documents
The code is as follows: [root @ krlcgcms01 test] # phpdoc-d "/tmp/test/mytest"-t "/tmp/test/doc"-o "HTML: frames: phpedit"

In the above sentence, the PHP file under the/tmp/test/mytest directory is generated and put under/tmp/test/doc. the document format is html.

[apacheuser@krlcgcms01 doc]$ lsblank.html elementindex.html li_首页.htmlclasstrees_default.html elementindex_首页.html mediaclasstrees_首页.html errors.html packages.htmldefault index.html 首页elementindex_default.html li_default.html

Go to the directory where the generated document is stored. The system does not contain Chinese characters, so Chinese characters are garbled.

Access the browser to download index.html.

PHP Documentor documentation tool

1. from this, we can see that the content in the document is mainly to list the annotation labels in the PHP file and the corresponding files, which looks quite comfortable. Nothing else.

The annotation label is as follows::

@ Author information
@ Const a constant defined by define
@ Deprecate APIs not recommended
@ Global variable
@ Package information
@ Param function parameters
@ Return value
@ See reference function
@ Since introduction time
@ Static variable
@ Var class member variables

2. if garbled characters exist, the generated html editing is
The code is as follows:
Changing it to gbk will not display garbled characters.

I hope this article will help you with PHP programming.

Articles you may be interested in:
  • Tips for building Vim as a custom PHP development tool
  • Download all common PHP Tools
  • Ten free php development tools are recommended.
  • 10 Practical PHP open-source tools
  • Installation and Use of php lightweight performance analysis tool xhprof
  • Share tools for implementing Web cache using php
  • 10 tools to simplify PHP Development
  • Share a PHP-created tool for the first letter of Chinese Pinyin
  • Two popular PHP encryption and decryption tools Zend Guard and iconCube
  • Install and use the dependency management tool Composer in PHP
  • How to use PHP to generate word documents in Windows
  • Principles and Examples of using PHP to export Word documents

Documentor installation and usage. This article describes how to install and use the php Documentor. Share it with you for your reference. The details are as follows: PHP Docum...

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.