How to check if mcrypt extension exists in php

后端 未结 3 1011
野性不改
野性不改 2021-02-13 17:28

I would like to know the simplest and fastest PHP code line to check if mcrypt extension is available/installed.

There is a function that encrypts a string and first it

3条回答
  •  我寻月下人不归
    2021-02-13 18:06

    You can also use extension_loaded():

    if (extension_loaded('mcrypt')) {
        echo "mcrypt is loaded!";
    } else {
        echo "mcrypt isn't loaded!";
    }
    

提交回复
热议问题