我已经安装了xampp。 xampp的版本是:
XAMPP 5.6.12-0
我正在努力:
OS X El Capitan,版本10.11.1
我在此路径中有php.ini
:
/Applications/XAMPP/xamppfiles/etc/php.ini
在其中,有一行:
extension=php_imap.dll
但是,未加载IMAP
扩展名,我知道这是因为我在终端上运行此命令:
php -r "print_r(get_loaded_extensions());"
这是我得到的结果:
Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => sqlite3
[7] => zlib
[8] => bcmath
[9] => bz2
[10] => calendar
[11] => ctype
[12] => curl
[13] => dba
[14] => dom
[15] => hash
[16] => fileinfo
[17] => filter
[18] => ftp
[19] => gd
[20] => SPL
[21] => iconv
[22] => json
[23] => ldap
[24] => mbstring
[25] => session
[26] => standard
[27] => mysqlnd
[28] => mysqli
[29] => PDO
[30] => pdo_mysql
[31] => pdo_sqlite
[32] => Phar
[33] => posix
[34] => readline
[35] => Reflection
[36] => mysql
[37] => shmop
[38] => SimpleXML
[39] => snmp
[40] => soap
[41] => sockets
[42] => exif
[43] => sysvmsg
[44] => sysvsem
[45] => sysvshm
[46] => tidy
[47] => tokenizer
[48] => wddx
[49] => xml
[50] => xmlreader
[51] => xmlrpc
[52] => xmlwriter
[53] => xsl
[54] => zip
)
如何安装/启用 IMAP 扩展程序
我在线搜索,发现this question,他们说要将extension=php_imap.dll
添加到我的php.ini
。但是,它已经存在了。
我继续搜索,我发现this question,他们说apt-get install php5-imap
。但是,我在终端上收到了以下错误
apt-get: command not found
您知道如何启用/安装IMAP扩展程序吗?
由于
答案 0 :(得分:0)
当使用OSX取消注释时,.dll扩展名似乎很奇怪。查找此行:extension = imap.so并取消注释,如果已注释。 然后重新启动你的apache 。然后,您可以通过将包含以下内容的test.php文件放入localhost进行检查:
<?php
echo phpinfo();
如果您这样做并打开网站,请在网站上搜索imap。它应该有像imap这样的标题
IMAP c-Client Version 2XXX
如果找到该条目,则应加载扩展名。