【发布时间】:2015-09-01 06:46:51
【问题描述】:
为什么
<?php
echo "HELLO WORLD 1"; // shows
error_reporting(E_ALL);
echo "HELLO WORLD 2"; // shows
print_r(mb_list_encodings()); // does not show
echo "HELLO WORLD 3"; // does not show
$result = mb_convert_encoding("apple", 'UTF-8');
echo "HELLO WORLD 4"; // does not show;
echo $result; // does not show;
// no error what so ever displayed.
?>
失败?什么会导致此功能失败?
我有一个 PHP 网页,它运行代码并在这一行停止,并返回 HTTP 500 错误。
但我不知道它为什么会失败。有什么建议去哪里检查吗?
更新: 错误日志显示
PHP Fatal error: Call to undefined function mb_convert_encoding()
【问题讨论】:
-
检查您的错误日志!它将包含比“500”更详细的错误描述。
-
开启错误报告/记录
-
你的php页面在哪里???
-
http 500 是内部重定向失败,与mb_convert_encoding函数无关
-
为什么要投票关闭? @Andrew 好的,然后忽略 http 500。问题是为什么 mb_convert_encoding 失败。