note 35352 deleted from function.gd-info by betz
| From: | betz@php.net | Date: | Thu, 05 Oct 2006 08:59:22 +0000 |
| Subject: | note 35352 deleted from function.gd-info by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118081@lists.php.net to get a copy of this message | ||
Note Submitter: Elie De Brauwer <elie at de-brauwer dot be>
----
Since I noted that gd_info() returned on my system more info than the manual said (11 fields instead
of 9, the extra fields are FreeType Linkage Support and JIS-mapped Japanese Font Support), I wrote
these two little functions that dump the information returend by gd_info() in a dynamical and
colored way.
<?
function describeGDdyn(){
echo "<ul>";
echo "<li>GD support: ";
if(function_exists("gd_info")){
echo "<font color=\"#00ff00\">yes</font>";
$info = gd_info();
$keys = array_keys($info);
for($i=1;$i<count($keys);$i++){
echo "</li>\n<li>".$keys[$i] .": " . yesNo($info[$keys[$i]]);
}
}else{
echo "<font color=\"#ff0000\">no</font>";
}
echo "</li></ul>";
}
function yesNo($bool){
if($bool){
return "<font color=\"#00ff00\"> yes</font>";
}else{
return "<font color=\"#ff0000\"> no</font>";
}
}
describeGDdyn();
?>