How to compile the CHM format PHP manual-Application Tips

Source: Internet
Author: User
Tags bz2 php and php cli
The CHM file format of Microsoft is very popular with us, because it can pack a lot of HTML files into a file, easy to transfer and share. And very easy to use, support indexing, search and so on. Because of this, you usually use the CHM version of the PHP manual.

Php.net regularly compiles PHP manuals and offers a variety of versions for everyone to download, including CHM format. Because it is compiled on a regular basis, we will never be able to get the latest manuals. If you want the latest manual, you'll have to compile it yourself. And the Chinese manual provided by Php.net can not search Chinese, the index is garbled.

Haohappy describes the compilation process:
1. Prepare a manual file in HTML format.
There are two ways of doing this:
1 through CVS to download the manual file, compile it yourself (to ensure the latest, but the compilation process will cost about 5 hours, generate more than 6,000 files, to have patience, alas. )
2 through the php.net download packaged HTML manual, to local decompression.

2. Download and install Microsoft (r) HTML help Workshop, which is installed by default in C:\Program files\html help workshop\;

3. Generate script files via CVS download CHM manual, located under Phpdoc/chm directory:
common.php
Make_chm. Readme
Make_chm.bat
make_chm.php
make_chm_fancy.php
Make_chm_spc.gif
Make_chm_style.css
<DIR> CHM
<DIR> html

4. Edit Make_chm.bat:
Modify the appropriate options according to your situation:
REM Path of the PHP CLI executable
Set Php_path=c:\php5\php.exe

REM Path of the Help Compiler command line tool
Set php_help_compiler= "C:\Program files\html help Workshop\hhc.exe"

REM The language of the manual to compile
Set Php_help_compile_lang=zh

REM The source directory with the original DSSSL made HTML
Set php_help_compile_dir=.\html

Notice that we set the directory of the HTML file to use to. \html, so we're going to put all the HTML files in.

5. Click "Start"-> "Run"-> "cmd", enter the corresponding directory under the command line, enter:
Make_chm.bat

If it goes well, a CHM-formatted PHP manual will be generated in the Chm/chm directory.

Compile a PHP manual with comments (User Notes):

In the Phpdoc/htmlhelp directory, there is another CHM file compilation system for generating extended CHM files (that is, CHM files with extended functionality).

Use steps:

1. Get the latest phpdoc HTML file; You can view the Xsl/version.xml to get version information and make sure you compile the latest manuals.

2. Under the Phpdoc directory:
Autoconf
./configure--with-chm=yes
Make chm_xsl
Optional parameter: "--with-xsltproc=path" specifies the Xsltproc path

3. Put the HTML file in the Phpdoc/htmlhelp/html directory (usually after 1 will automatically copy the HTML file to the directory)

4. Download Http://cn.php.net/include/mirrors.inc
or Http://cn2.php.net/include/mirrors.inc.
Put it in the HTMLHelp directory, and Make_chm.bat the same directory.

5. Download http://cn.php.net/backend/notes/all.bz2
Use the BUNZIP2 all.bz2 command to extract the same and place it in the HTMLHelp directory.

6. Rename the local_vars.php.src to local_vars.php and modify the configuration according to the actual situation.
7. Last Run:
Make_chm.bat

During the compilation, Mr. Will form a comment-related CHM file, and then finally generate a total CHM manual.

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.