<?php // ۞ // text { encoding:utf-8 ; bom:no ; linebreaks:unix ; tabs:4sp ; }
$version = '0.3';
/*
php xt's..
returns all the modules and functions available on your server and a link
to their manual page, either a local copy or the online version.
local is preferable. at least while you are learning php, you will access
the manual *a lot*, so it makes sense not to suck up all that banwidth
unneccessarily. however, the online version is better, because it has user
comments at the bottom of the pages. it's a pity the php folks don't do a
downloadable version with all the comments in it. hmm.
if you use a decent browser** with "type-to-find", this page becomes a
lightning-fast means to locate you manual pages. a corzoogle in your manual
folder is another way to half your php apprenticeship time!
**I use Camino and FireFox, which both have this functionality.
;o)
(c) copyright corz.org 2000->today
*/
/*
prefs.. */
/*
base url for manual pages
this can be an online version, or a local copy..
*/
$man_url_base = 'http://www.php.net/manual/en/';
//$man_url_base = 'http://phpman/'; // local dedicated php manual serving virtual host!
/*
extension.
probably '.html' for a local copy, '.php' for the online version */
$page_ext = '.php';
//$page_ext = '.html';
/*
end prefs */
$ext = get_loaded_extensions();
asort($ext);
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>this server\'s available php modules (extensions) and functions</title>
</head>
<body>
<table width="80%" cellspacing=0 cellpadding=0 align="center">
<tr><td height=15></td></tr>
<tr>
<td>
<h1 id="top">php functions</h1>
click any one of them to load its manual page.<br />
<br />
</td>
</tr>
<tr>
<td>
<h3>module index</h3>
<ul>';
foreach($ext as $module) {
echo '
<li><a href="#',$module,'">',$module,'</a><br />';
}
echo '
</ul><ul>';
foreach($ext as $module) {
echo '
<li id="',$module,'"><a href="#top">',$module,'</a><ul>';
$func_array = get_extension_funcs($module);
if (is_array($func_array)) {
asort($func_array);
foreach($func_array as $function) {
echo '
<li><a href="',$man_url_base,'function.',str_replace('_', '-', $function),$page_ext,'">',$function,'</a>';
}
}
echo '
</ul>';
}
echo '
</ul>
</td>
</tr>
</table></body></html>';
?>
|