1. main features of Extended CHM
Customizable right-click menu
Php code block highlighted with syntax
The function in the php code block carries the corresponding function manual link.
Clearer manual interface
You can customize the appearance style of the manual.
Supports skin replacement
More detailed manual content
With very practical user notes
Can be integrated into most ide and editor
For more information, visit
< >
2. why DIY?
Somehow, such a good stuff has not been updated on the official php website for a long time (the latest official
Version 2003.9.6). especially after php5 is released, many contents cannot be found.
In this way, we can only carry forward the DIY spirit and make our own. ^_^
3. prerequisites
Use of the cvs client.
Basic operations in linux and software compilation and installation.
4. Software Requirements
Cvs client software:
We will use the cvs server on the official php website to obtain the latest phpdoc version.
Wincvs Chinese version is recommended in windows
< Ncvs/>
The operating systems in the unix camp generally come with cvs clients,
You can directly type "cvs version" in the command line to check whether cvs is installed,
If not
< > Download the latest version
Cvs client
Windows:
Run Microsoft Html Help Workshop on windows to generate a chm file.
You can also run wine in linux to simulate windows
Microsoft Html Help Workshop
Microsoft's tool for generating chm files
< Workshop>
Linux:
We need to compile and install the manual and some necessary software packages here,
You can also use other unix camp systems,
Or simply use cygwin, vmware, and other software to simulate a linux environment in Windows.
PHP4.0 or later:
Php is used to compile and generate chm files. Therefore, you need to compile and generate chm files in windows and linux.
Install php.
Environment used in this article:
Two PCs with redhat 9 and windows 2000 professional
5. start DIY
First
Install OpenJada and OpenSP
Go to the linux console
Code :--------------------------------------------------------------------------------
$ Mkdir/home/phpdoc
$ Cd/home/phpdoc
$ Wget "http://prdownloads.sourceforge.net/openjade/openjade-1.3.2.tar.gz"
$ Wget "http://prdownloads.sourceforge.net/openjade/OpenSP-1.5.1.tar.gz"
$ Tar-zxvf * .tar.gz
$ Openjade-1.3.2 cd
$./Configure
$ Make
$ Make install
$ Cd ../OpenSP-1.5.1
$./Configure
$ Make
$ Make install
$ Cd ../
--------------------------------------------------------------------------------
Then, we will obtain the latest phpdoc version from the official php cvs server.
In this case, make some minor corrections.
Open/home/phpdoc/xsl/htmlhelp-db.xsl in the editor
Search for "@ DOCBOOKXSL_HTML @" in this file @",
Replace it with "./docbook/html/chunk. xsl" and save the disk and exit
Then open/home/phpdoc/xsl/html-common.xsl
Add the following code to the end of the file:Row above, and save the disk to exit
Now, you need to complete the operations on the linux platform.
Now proceed to the windows environment
First, extract the phpdoc.tar.gz
The link to the related functions is incorrect in some files generated after compilation of the obtained version,
Modify the htmlhelp/filter_files.php file.
Add the following code to the header:
PHP code :--------------------------------------------------------------------------------
// Fix functions link error
Function fix_function_link ($ m ){
$ Fname1 = 'function.'.strtolower(str_replace('_', '-', then m?1=}.'.html ';
$ Fname2 = 'function.'.strtolower(str_replace('_', '.', then m?1=}.'.html ';
If (file_exists ("html/". $ fname1 )){
Return'
'. $ M [1].' ()';
} Elseif (file_exists ("html/". $ fname2 )){
Return'
'. $ M [1].' ()';
} Else {
Return'
'. $ M [1].' ()';
}
}
After saving the disk, rename "htmlhelp \ local_vars.php.src"
"Htmlhelp \ local_vars.php"
Edit "htmlhelp \ local_vars.php ",
Set the $ HELP_WORKSHOP variable value to the installation directory of Html Help Workshop.
Output
Add the directory of php.exe to the path environment variable.
In "Run", type cmd to enter console mode, and enter the release directory of phpdoc.tar.gz.
Code :--------------------------------------------------------------------------------
Cd htmlhelp
Make_chm.bat
--------------------------------------------------------------------------------
After the execution, the Extended CHM php syntax manual is generated.
Stored in the htmlhelp/release Directory
Download again
< > And save it to the Manual directory.
You can right-click the menu in the manual and set the skin.
After setting, double-click php_manual_en.chm to browse the manual. (source: Viphot)
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.