undefined function mb_detect_encoding

undefined function mb_detect_encodingFatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc:177 Stack trace: #0 C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc(279): _encode('Error') #1 C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc(286): _gettext('Error') #2 C:\wamp\apps\phpmyadmin4.1.14\libraries\core.lib.php(229): __('Error') #3 C:\wamp\apps\phpmyadmin4.1.14\libraries\core.lib.php(302): PMA_fatalError('The [a@./url.ph...') #4 C:\wamp\apps\phpmyadmin4.1.14\libraries\common.inc.php(90): PMA_warnMissingExtension('mbstring', true) #5 C:\wamp\apps\phpmyadmin4.1.14\index.php(12): require_once('C:\\wamp\\apps\\ph...') #6 {main} thrown in C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc on line 177

之所以会出现这个问题是因为php扩展不能正常加载,而导致扩展无法加载的原因是C:\wamp\bin\php\php-7.4.15-Win32-vc15-x64\phpForApache.ini配置文件里引入的扩展目录时必须是绝对路径,所以将extension_dir = "ext"改为extension_dir = "C:/wamp/bin/php/php-7.4.15-Win32-vc15-x64/ext/",重启WampServer完美解决。

评论
:broken_heart: :confounded: :flushed: :frowning: :grinning: :heart: :kissing_heart: :mask: :pensive: :rage: :relaxed: :scream: :smile: :smirk: :sob: :stuck_out_tongue_closed_eyes: :stuck_out_tongue_winking_eye: :wink: