How to check if modules are enabled in php or not

Posted By: Matpal Media - 9:25 AM
To check if some particular modules such as PDO, XML, SQLLITE, FTP enabled in your PHP or not, we can use get_loaded_extensions() method.




<?php
echo "<pre>";
print_r(get_loaded_extensions());
?>



This will show you following modules are enabled


Array
(
    [0] => Core
    [1] => bcmath
    [2] => calendar
    [3] => ctype
    [4] => date
    [5] => filter
    [6] => hash
    [7] => iconv
    [8] => json
    [9] => mcrypt
    [10] => SPL
    [11] => pcre
    [12] => Reflection
    [13] => session
    [14] => standard
    [15] => mysqlnd
    [16] => tokenizer
    [17] => zip
    [18] => zlib
    [19] => libxml
    [20] => dom
    [21] => PDO
    [22] => bz2
    [23] => SimpleXML
    [24] => xml
    [25] => wddx
    [26] => xmlreader
    [27] => xmlwriter
    [28] => apache2handler
    [29] => openssl
    [30] => curl
    [31] => fileinfo
    [32] => gd
    [33] => gettext
    [34] => mbstring
    [35] => exif
    [36] => mysqli
    [37] => pdo_mysql
    [38] => pdo_sqlite
    [39] => Phar
    [40] => ftp
)


0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.