使用at符号(@)进行函数调用是一个标准的开箱即用选项,还是需要在PHP.ini中启用它?
PHP Parse错误:语法错误,第467行/htdocs/www/PHPMyAdmin/libraries/common.inc.PHP中的意外“@”
这是PHP脚本文件中的第467行:
if(@extension_loaded(‘mbstring’)&&!empty(@ini_get(‘mbstring.func_overload’))){
如果需要在PHP.ini中启用它可能是什么?
谢谢.
修订
/**
* check for errors occurred while loading configuration
* this check is done here after loading language files to present errors in locale
*/
$GLOBALS['PMA_Config']->checkPermissions();
$GLOBALS['PMA_Config']->checkerrors();
/**
* As we try to handle charsets by ourself, mbstring overloads just
* break it, see bug 1063821.
*
* We specifically use empty here as we are looking for anything else than
* empty value or 0.
*/
if (@extension_loaded('mbstring') && !empty(@ini_get('mbstring.func_overload'))) {
PMA_fatalError(
__(
'You have enabled mbstring.func_overload in your PHP '
. 'configuration. This option is incompatible with PHPMyAdmin '
. 'and might cause some data to be corrupted!'
)
);
}
解决方法:
Prior to PHP 5.5,
empty()
only supports variables; anything else
will result in a parse error. In other words, the following will not
work:empty(trim($name))
. Instead, usetrim($name) == false
.
所以@不是变量并产生错误.如果从empty()调用中删除@:
if (@extension_loaded('mbstring') && !empty(ini_get('mbstring.func_overload'))) {}
Parse error: Syntax error, unexpected T_STRING, expecting T_VARIABLE or ‘$’
PHP 5.3.3于7年前发布,3年多来一直没有得到支持.如果无法升级(推荐)请使用phpMyAdmin 4.0.10.20.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。