Integrating the PHP Manual

The information provided here is mainly aimed at IDE authors, or advanced users who would like to integrate this CHM file to their favorite IDEs or other production environment components.

There are several editors out there with support for CHM integration, but you may need to know a few things about what the CHM contains to successfully integrate the manual into your environment.

The CHM is built using XSL style sheets from XML sources. This is unique currently in the PHP Manual family, as all other versions are generated using DSSSL style sheets. This also means, that non-intentional rendering differences may come up. A special conversion script is run on the XSLT output, adding several cute features, and packing up the manual with the preferences files and skin examples.

If you never worked with CHMs, you can think of them as compressed files with OS supported access for files inside and some added search and index support. However CHMs can only be viewed using the HTML Help Viewer, you can directly access files inside them using a special URL prefix, the CHM file name and the file you request from inside. As all the help content is stored in HTML files, you can show pages of the CHM in Internet Explorer.

Assume that you placed yourphp_manual_en.chmtoc:\phpmanualthe index file in the manual(which you see the first time)can be accessed with the following URL:mk:@MSITStore:C:\phpmanual\php_manual_en.chm::/_index.html. Heremk:@MSITStore:is the special "protocol",C:\phpmanual\php_manual_en.chmis the CHM with it's full path. The/_index.htmlpart is the path to the index file inside the CHM and::is just what you need to put between the CHM path and this file path.

All files are in the root directory of the CHM, unlike the previous CHM versions which included a language directory. Images, style sheets and other supplemental files have names starting with an underscore(like the main index shown above), to avoid name collisions.

淘宝 adsense 商品推荐

正版 Google AdSense实战宝典:用谷歌广告联盟出海赚美元 第2版 seo搜索引擎优化 广告营销 网站运营书籍 AdSense从入门到精通


The names of generated files follow the same rules as the online manual, except that the extension is.htmland not.php. The most important is that function documentation files are namedfunction.FUNCNAME.htmlwhereFUNCNAMEis the function name, with all underscores converted to hyphens. Some examples arefunction.echo.html,function.mysql-close.html,function.imagecopy.html.

Using all this information, you can show a manual page for a function requested by a user. A simple example is included in the distribution, namedphp_quickref.hta. This is a » HTML Application to demonstrate the simple process of showing a manual page for a function. ThequickRef()function defined therein does the job.

If you would like to integrate the manual into an IDE without direct support for the PHP manual(actually the underscore to hyphen conversion), you can use the included_function.htmlfile to access a function page. This file is simply a redirector, and can be parameterized via the URL, as_function.html#mysql_close. This page will redirect you to the mysql_close function page(function.mysql-close.html)automatically. You can provide the full path of this file if your IDE supports context sensitive help, and provide the IDE specified string as the parameter. An example for this is the UltraEdit 9 intergation(see the edition's website).

The index of the manual(accessible via the index tab on the navigation pane)can also be used for integrational purposes. All the HTML pages are included in the index with their titles as index terms(including function description pages).

If you are a desktop application developer and would like to tightly integrate the CHM into your program(such as displaying the TOC tree in your IDE's help box), you can find more information at », as well as links to other useful resources. The official site for HTML Help is at »

淘宝 云主机 商品推荐