-Original Message-
From: Esteban Fernandez [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 16:09
Also works... :)
?php
$array = get_loaded_extensions();
for ($i=0;$i=count($array);$i++) {
if (gd == $array[$i]) $installed = true;
else $installed = false;
}
This will only
-Original Message-
From: Svein Larsen [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 16:22
$gd_loaded = (extension_loaded('gd'))?1:0;
Well, this also fails the simple-as-possible test: if the value returned by
extension_loaded() can be used to drive the ?: operator, it must be
Thats true, but its more overhead calling a function than compare a variable.
Thats why i want to calll the function only once.
- Svein
On Thursday 05 June 2003 14:03, Ford, Mike [LSS] wrote:
-Original Message-
From: Svein Larsen [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 16:22
$gd_loaded = (extension_loaded('gd'))?1:0;
Well, this also fails the simple-as-possible test: if the value returned
by
extension_loaded() can be used to drive the ?: operator, it must be
evaluable as a Boolean; this means you can use it directly for later use
in
an if() or similar
Is there a way to check within an application if the gd library has
been installed?
Maybe get_loaded_extensions()
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Also works... :)
?php
$array = get_loaded_extensions();
for ($i=0;$i=count($array);$i++) {
if (gd == $array[$i]) $installed = true;
else $installed = false;
}
if ($installed = true) echo yeah... GD installed;
else echo shit.. GD not installed.;
?
Regards.
EF.
Cpt John W. Holmes [EMAIL
PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 4:11 PM
Subject: Re: [PHP] Is gd present?
Is there a way to check within an application if the gd library has
been installed?
Maybe get_loaded_extensions()
---John Holmes...
--
PHP General Mailing List (http
$gd_loaded = (extension_loaded('gd'))?1:0;
Then you can use if ($gd_loaded) later in your code.
- Svein
-Original Message-
From: Esteban Fernandez [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 17:09
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Is gd present?
Also works
: Wednesday, June 04, 2003 17:09
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Is gd present?
Also works... :)
?php
$array = get_loaded_extensions();
for ($i=0;$i=count($array);$i++) {
if (gd == $array[$i]) $installed = true;
else $installed = false;
}
if ($installed = true) echo
9 matches
Mail list logo