用perl来解析你的php文档
What is PhpXref ?
PHPXref (PHP Cross Referencing Documentation Generator),为一种开发文档生成工具,用于处理包含大量 PHP 文件的项目,为 PHP 源代码增加交叉参考,快速地为显示的 PHP 源代码添加书签链接,使得浏览源代码变得方便快速。其工作原理是遍历项目目录,将 PHP 文件的源代码翻译成可读性很强的 HTML 文件,同时加上注释,生成的结果为 HTML 文件,可使用任何浏览器进行浏览。运行只需安装 Perl 即可。
这个在没有CVS服务器或Sub Version的环境下,phpXref不失为一个好的发布php代码,文档同步的好工具
PhpXref Features快速,方便,需求简单
不用任何web服务器就可以输出,
完全匹配php的函数,classes,变量,常量,并支持包含文件
JS的特性,支持跳转,搜索,历史
高亮,代码提示,鼠标效果
完美的打印效果
跨平台,从linux,*nix,win32无缝兼容.
How Get PhpXref ?you can visit web site: http://phpxref.sourceforge.net/
你可以从那获取到linux,win32的版本,
当然默认有需要perl 解析器的支援,你也可以选择编译后exe的版本.
How Use PhpXref ?你首先到官方网站下载最新版本的PhpXref ,这里拿win32的版本做个说明,
下载回来后,解压到任何目录,
将你要产生 cross reference 的 code 复制到 source 内
然后用编辑器打开phpxref.cfg ,
修改第10行的 SOURCE=source 你的code所在的目录,
修改第14行的 OUTPUT=output 你的code输出的目录,
17行为工程的命名:PROJECT=Unnamed Project v0.00
26行为cross reference 默认的头部 HEADERFILE=sample_header.html
将编码修改为你需要的编码,
保存phpxref.cfg
直接运行phpxref.exe,剩下的结果就是等待了.
PHPXref 0.6
(c) Gareth Watts 2004
Processing..
Source............: /tmp/phpxref-0.3/source
Target............: /tmp/phpxref-0.3/output
Scanning Tree.....: ....................................................................
Generating Output.: ....................................................................
Generating variable references: .......
Generating function references: .....
Generating class references: .
Generating table references:
Summary statistics:
Files Scanned: 68
62 variable names in 120 definitions and 507 references.
49 function/method names in 28 definitions and 349 references.
1 class names in 2 definitions and 6 references.
0 table names in 0 references.
Done.
发布,你将output的文档复制到任何web目录下,
你可以用http://yoursite.com/output 看到php cross reference 的结果
Some Demo !很多开源工程都设立了phpXref的镜像,
这里推荐几个,
Xoops cms系统 :http://xoopsforge.com/ref/language/s...hp.source.html
wordpress blog系统:http://cenamayo.com/wpxref/
Tikiwiki :http://de.tikiwiki.org/xref-BRANCH-1...hp.source.html
DokuWiki :http://dev.splitbrain.org/reference/...les/index.html
着名的开源论坛phpbb : http://www.phpbb.de/doku/xref/nav.html?index.html
遗憾的是大陆的php开发团队,目前偶还没看到任何使用PhpXref 文档镜像的站点.
在台湾的一些技术网站看到了部分的使用..
本文作者:
«
»