Fork me on GitHub



Make donations with PayPal!
Goal: $100.00
Due Date: Oct 31
Gross Amount: $25.00
Net Balance: $23.72
Left to go: $76.28

kakos  ($25)Oct-25

GitHub Twitter

Learn XOOPS Core

Local Support


XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 admin adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs Clicks Cloud content CĂN demo download Dresses facebook Fat floor Gateway giải Google Guide herre Home Honeypot html5 Human HỘ IP iPhone jQuery Language Law Legal List Loss module modules Monster new newbb news nhiệt NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights Room security Sentry Signatures Signed site Smartphone Smarty Smoking Solution Spam stem Studio support tag tdmcreate The Theme themes tháp User userlog weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 139447


Welcome to XOOPS!


News archives

Easy Referencing for PHP Files

Posted by Rooster on 2003/5/6 17:10:34 (4199 reads) | Posted on Developer News
Hello, all. Just a sharing note. This weekend, I had a need for a script that could quickly parse files from a PHP-scripted application for an article I'm working on into a tree for viewing and analysis purposes. Consequently, I downloaded and installed a SourceForge project called PHPXref.

PHPXref does exactly what I was looking for. It parses a directory tree of PHP files and extracts suitably formatted comments placed in the scripts to generate a cross-referenced tree of HTML files and documentation that can be viewed using any Web browser, with or without a Web server.

Unfortunately, the script did not function as designed on my Windows development machine without some tweaking. That's why I'm sharing, because if you are not familiar with PHPXref, then you might find it of some use in your own work or in administering your site.

What are PHPXref core features?
[*] Generates plain HTML output that can be viewed with any Web browser and downloaded onto the local machine for quick reference or shared across the Web with others.

[*] Creates links to the source code of all files in a tree for viewing by line number.

[*] Cross-references functions, variables, include() and require()'d files and SQL table usage.

[*] Produces complete linkages to functions, variables, and, optionally, a table list.

[*] Contains a lookup engine to quickly find a function, variable, or table.

[*] Generates a client-side quick-search search box for javascript-enabled browsers.

[*] Creates a left-side navigation frame that can be turned on or off, as well as the traditional tree menu view for easy navigation.

How can PHPXref be used?
The short answer is for many purposes other than what it was intended. Because PHPXref provides an easy means of viewing and documenting PHP files, it means that

[*] you can manage your own PHP scripts while you code for these purposes.

[*] it can be used efficiently by programmers who are collaborating remotely to simultaneously view the same file online outside of a text editor so as to make comments and changes in near real-time if they sync the appropriate technologies together (FTP, email, portal, CVS, etc. ).

[*] PHPXref can be used in technical support forums when references to specific lines of code to assist users is required so that both helper and user can view the same spec.

[*] assist you in better managing your XOOPS site. Have a problem, reference your exact code easily without cutting and pasting.

These are just a few uses. I'm sure you can think of others. To see the script in action, visit PHPXref's SourceForge project page, where the script was run on the SourceForge PHP Source files. You can view the results there to see what the output looks like, as well as download a Linux version of the script.

For my Windows mod, you can download here and now. This DL contains the original files, plus the Windows32 files, which are designated with a -win32 notation in the file name. Enjoy!

Printer friendly page Send this story to a friend Create a PDF from the article
Bookmark Me
Bookmark to Google Plus
The comments are owned by the author. We aren't responsible for their content.

That DL link runs into a XOOPS LEECH BLOCKER. Might Wanna change the link to ... nloads/viewcat.php?cid=14

or something
Published: 2003/5/7 7:44 • Updated: 2003/5/7 7:44
OK, lykoszine, but I can't reference the link from this end, since it's an article rather than a post. You guys can edit to send our users to the download homepage.
Published: 2003/5/7 9:33 • Updated: 2003/5/7 9:35
Should I point out the irony that this is written Perl?
Published: 2003/5/7 12:38 • Updated: 2003/5/7 12:38
Hehe, but not too ironic. Processing text like that is one of Perl's real strong suits.
Published: 2003/5/7 13:49 • Updated: 2003/5/7 13:49
Published: 2003/5/7 20:36 • Updated: 2003/5/7 20:38
I was just trying to be cute. Of course Perl is great for text processing...the right tool for the job.
Published: 2003/5/7 21:20 • Updated: 2003/5/7 21:20