服务器中的cakephp 3.2中未显示Intl和mbstring扩展错误

时间:2016-11-07 06:36:13

标签: php cakephp cakephp-3.x cakephp-3.2

我正在使用cakephp 3.2。 在这里,我的项目完美地在当地工作。 我已经将它上传到实时服务器。在我的服务器中,我检查了phpinfo.php页面,并且在服务器中没有启用intl和mbstring扩展,但是没有显示这两个错误消息。 我没有得到正在发生的事情。 由于服务器中未启用扩展,因此应出现此错误消息。

// You can remove this if you are confident you have intl installed.
if (!extension_loaded('intl')) {
    trigger_error('You must enable the intl extension to use CakePHP.', E_USER_ERROR);
}

// You can remove this if you are confident you have mbstring installed.
if (!extension_loaded('mbstring')) {
    trigger_error('You must enable the mbstring extension to use CakePHP.', E_USER_ERROR);
}

有任何帮助吗? 谢谢。

1 个答案:

答案 0 :(得分:1)

将这些行放在root index.php 文件中以显示所有错误

error_reporting(E_ALL);
ini_set("display_errors", "on");

(在这一行的开销)

require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';