Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $10.00
Net Balance: $9.41
Left to go: $90.59

Donations
Dante7237  ($10)Sep-30

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 adslight Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor for free Gateway Google Guide herre Home Honeypot html5 Human HỘ IP iPhone jQuery Language List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Spam stem Studio support tag tdmcreate template The Theme themes User userlog weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137804

DigitalEdito

Welcome to XOOPS!

Archives

News Archives

Easy Referencing for PHP Files

Posted by Rooster on 2003/5/6 16:10:34 (3912 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

http://webportals.percolations.com/mo ... nloads/viewcat.php?cid=14

or something
Published: 2003/5/7 6:44 • Updated: 2003/5/7 6: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 8:33 • Updated: 2003/5/7 8:35
Should I point out the irony that this is written Perl?
Published: 2003/5/7 11:38 • Updated: 2003/5/7 11:38
Hehe, but not too ironic. Processing text like that is one of Perl's real strong suits.
Published: 2003/5/7 12:49 • Updated: 2003/5/7 12:49
Exact.
Published: 2003/5/7 19:36 • Updated: 2003/5/7 19: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 20:20 • Updated: 2003/5/7 20:20