April 2nd, 2006
Highly recommend PhpDocumentor. I won’t explain what it is, since it’s pretty self evident: it documents your PHP code. Oops–just explained it.
Their site is slightly fudged but don’t let that put you off. The easiest way to install it is through PEAR. You can either use it through the command line, or through the (again) slightly fudged web-based interface. It’s slightly awkward to get going, but once you understand how it works–it works. So first off create a PEAR directory on your server so that it has something to install to:
cd /path/to/public_html mkdir pear
Next set it as a default data directory:
cd /path/to/php/bin ./pear config-set data_dir /path/to/public_html/pear
Next some magic:
./pear install --alldeps phpdocumentor
Failed to download pear/phpdocumentor within preferred state "stable", latest release is version 1.3.0RC5, stability "beta", use "channel://pear.php.net/phpdocumentor-1.3.0RC5" to install
Cannot initialize 'phpdocumentor', invalid or missing package file
Package "phpdocumentor" is not valid
install failed
Oops, so change it to:
./pear install --alldeps channel://pear.php.net/phpdocumentor-1.3.0RC5
Now that everything’s installed, load up your browser to “localhost” and navigate to your data directory, which should be something like “http://localhost/pear” then click on phpdocumentor. You’ll be presented with the main web-based interface. Here are some quick start steps to using it:
Some of the designs can look quite gnarly, so here’s what I do: