Phpdoc use 1

Source: Internet
Author: User
: This article describes how to use phpdoc. For more information about PHP tutorials, see. Phpdoc usage (1)

Recently, due to business needs, documents need to be developed and code comments should be properly written. Therefore, you should simply write them in the phpdoc format and use them to generate documents. the document looks pretty good.

1. install phpdoc

pear channel-discover pear.phpdoc.orgpear install phpdoc/phpDocumentor

2. you can usephpdoc -hTo view phpdoc usage information.

user@ubuntu15:/srv$ phpdoc  -hUsage: project:run [-t|--target[="..."]] [--cache-folder[="..."]] [-f|--filename[="..."]] [-d|--directory[="..."]] [--encoding[="..."]] [-e|--extensions[="..."]] [-i|--ignore[="..."]] [--ignore-tags[="..."]] [--hidden][--ignore-symlinks][-m|--markers[="..."]] [--title[="..."]] [--force][--validate][--visibility[="..."]] [--defaultpackagename[="..."]] [--sourcecode][-p|--progressbar][--template[="..."]] [--parseprivate][--log[="..."]]...

-D path of the source PHP file
-T storage path of the generated document (it is best to create a folder for it)
-Name of the dn package (default by default, preferably the project name)
-Name of the dc Directory (default, preferably the project name)
-Ti document Title: This is the title of the homepage.
-O: The template format of the generated document. There should be many options, but I only choose: HTML: Smarty: PHP (beautiful feeling)

3. practice

phpdoc -d /remote/ -t ~/Documents/

Many files are generated in the specified directory.

classes          phpdoc-cache-15  phpdoc-cache-3d  phpdoc-cache-60  phpdoc-cache-8b  phpdoc-cache-be  phpdoc-cache-e2css              phpdoc-cache-18  phpdoc-cache-41  phpdoc-cache-61  phpdoc-cache-8c  phpdoc-cache-c1  phpdoc-cache-e3extension-src    phpdoc-cache-1a  phpdoc-cache-42  phpdoc-cache-65  phpdoc-cache-91  phpdoc-cache-c6  phpdoc-cache-e4files            phpdoc-cache-1b  phpdoc-cache-43  phpdoc-cache-66  phpdoc-cache-92  phpdoc-cache-c7  phpdoc-cache-edfont             phpdoc-cache-1c  phpdoc-cache-44  phpdoc-cache-6f  phpdoc-cache-9a  phpdoc-cache-c8  phpdoc-cache-f0graphs           phpdoc-cache-1f  phpdoc-cache-49  phpdoc-cache-72  phpdoc-cache-9c  phpdoc-cache-c9  phpdoc-cache-f3js               phpdoc-cache-20  phpdoc-cache-4a  phpdoc-cache-74  phpdoc-cache-9e  phpdoc-cache-ca  phpdoc-cache-f5namespaces       phpdoc-cache-23  phpdoc-cache-4f  phpdoc-cache-76  phpdoc-cache-a4  phpdoc-cache-cb  phpdoc-cache-f8phpdoc-cache-01  phpdoc-cache-26  phpdoc-cache-50  phpdoc-cache-77  phpdoc-cache-a5  phpdoc-cache-cd  reportsphpdoc-cache-05  phpdoc-cache-29  phpdoc-cache-51  phpdoc-cache-78  phpdoc-cache-a9  phpdoc-cache-cfphpdoc-cache-09  phpdoc-cache-2b  phpdoc-cache-54  phpdoc-cache-79  phpdoc-cache-b2  phpdoc-cache-d1phpdoc-cache-0d  phpdoc-cache-2e  phpdoc-cache-58  phpdoc-cache-7d  phpdoc-cache-b4  phpdoc-cache-d3phpdoc-cache-10  phpdoc-cache-38  phpdoc-cache-5b  phpdoc-cache-81  phpdoc-cache-b6  phpdoc-cache-d5phpdoc-cache-13  phpdoc-cache-39  phpdoc-cache-5e  phpdoc-cache-86  phpdoc-cache-bc  phpdoc-cache-d7

Run index.html to view the generated document.

'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
  • '). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script

    The above introduces the use of phpdoc, including the content, hope to be helpful to friends interested in PHP tutorials.

    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.