note 48001 added to function.gd-info
| From: | phpnet at furp dot com | Date: | Wed, 08 Dec 2004 18:59:14 +0000 |
| Subject: | note 48001 added to function.gd-info | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81541@lists.php.net to get a copy of this message | ||
I updated the function below to include the GD Version info and any other string fields. The
function only showed the bool values before.
// Retrieve information about the currently installed GD library
function describeGDdyn() {
echo "\n<ul><li>GD support: ";
if(function_exists("gd_info")){
echo "<font color=\"#00ff00\">yes</font>";
$info = gd_info();
$keys = array_keys($info);
for($i=0; $i<count($keys); $i++) {
if(is_bool($info[$keys[$i]])) echo "</li>\n<li>" . $keys[$i] .": "
. yesNo($info[$keys[$i]]);
else echo "</li>\n<li>" . $keys[$i] .": " . $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>";
}
----
Manual Page -- http://www.php.net/manual/en/function.gd-info.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48001
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48001&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48001&report=yes
Search -- http://master.php.net/manage/user-notes.php