Re: PHP extensions (dll's)
| From: | David Elliott | Date: | Tue, 08 Jun 2004 14:41:50 +0000 |
| Subject: | Re: PHP extensions (dll's) | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23937@lists.php.net to get a copy of this message | ||
Hello Gerardo
On 08 June 2004 at 08:36:53 -0500 (which was 14:36 where I live) Gerardo
Rojas cleared their throat and spoke
GR> Is there a way to find out what extensions are loaded, at runtime?
GR> I want to know if a certain dll is loaded or another one is loaded, so I
GR> can write my code accordingly.
GR> To be specific: I want to know if the php_mssql.dll is loaded or
GR> the php_odbtp_mssql.dll has been loaded? Any input would be appreciated.
Try this. :)
=============8<=============================================================
<html>
<head>
<title>PHP info checkup</title>
</head>
<body>
<table width=100% cellspacing=0 border=0>
<td>
<table width=100%>
<tr><td>php version:</td><td><b><?= print
@phpversion()?></b></td></tr>
<tr><td>server api:</td><td><b><?= print
@php_sapi_name()?></b></td></tr>
<tr><td>loaded extensions:</td><td><b><?php $extensions =
@get_loaded_extensions(); print count($extensions)?></b></td></tr>
<tr><td>system:</td><td><b><?= print
@php_uname()?></b></td></tr>
</table>
</td>
<td align=right valign=top><?= print gmdate("r") ?> </td>
</tr>
<tr>
<td><b>activated extensions:</b></td>
<td><b><?= @strtolower($HTTP_GET_VARS["ext"]) ?> function
list:</b></td>
</tr>
<tr>
<td valign=top width=50%>
<table width=100%>
<?
@sort($extensions);
foreach($extensions as $extension)
{
print "<tr><td width=30%>$extension</td><td><a
href=\"?ext=$extension\">function list</a></td></tr>\n";
}
?>
</table>
</td>
<td valign=top width=50%>
<table>
<?
if(isset($HTTP_GET_VARS["ext"]))
{
$functions = @get_extension_funcs($HTTP_GET_VARS["ext"]);
@sort($functions);
foreach($functions as $function)
{
print "<tr><td><a href=\"http://www.php.net/manual/function.".str_replace("_","-",$function).".php\"
target=\"_blank\">$function</a></td></tr>\n";
}
};
?>
</table>
</td>
</tr>
</tr>
</table>
</body>
</html>
=============8<=============================================================
--
BBFN, _______________________________________________
David | David Elliott | Software Engineer |
_________________________| list@elliott.uk.com | PGP Key ID 0x650F4534 |
| Rush Limbaugh: The world's most gifted idiot. |