LOW COST JAVA PHP MYSQL CGI PERL
HOSTING SERVICE
LINUX WINDOWS CPANEL WHM PLESK
HOSTING PACKAGES
ECOMMERCE HOSTING ASP JSP MSSQL
FRONTPAGE HOSTING
CPANEL WHM RESELLER DEDICATED
SERVER WEB HOSTING

extension_loaded() in PHP

PHP 3 and above supports function extension_loaded() which findx out whether a extension is loaded or not.
syntax : bool extension_loaded ( string name )

This function returns TRUE if the extension identified by name is loaded, FALSE otherwise.

This function is not much used in the simple coding of small websites, but when applications are created then for finding out the different extensions loaded with PHP on individual systems this function is used.

For example, if one want to find out whether ‘gd’ has been installed then use this function as follows :
<?php
if (extension_loaded(’gd’))
echo “GD installed”;
else
echo “GD not installed”;
?>

We can use this code on any web page if want to find out if GD support is enabled on our server or not. Nowadays, many servers require GD support for using different image functions of PHP.

There are a number of extensions used in PHP; all the extensions can be found using phpinfo().

Bookmark on del.icio.us digg this

This post is compiled by eUKhost.com

Leave a Comment

You must be logged in to post a comment.