奇怪的致命错误:无法重新声明函数


Weird Fatal error: Cannot redeclare function

我有错误的奇数值,如

PHP致命错误:Cannot redeclare chkconfig()(先前在D'x01:27中声明)

PHP致命错误:Cannot redeclare chkconfig(声明在('x93'x03u'xa2'x7f:27)

PHP致命错误:Cannot redeclareChkconfig()(先前声明在'x98'xe9'xc6t'xa2'x7f:27)

PHP致命错误:Cannot redeclare chkconfig()(先前在自慰' xa2 ' x7f: 27)

PHP致命错误:无法重新声明chkconfig()(先前在@.'xf7t'xa2'x7f:27中声明)

,但它没有在任何其他地方声明。奇值是什么意思?

你可以试试这个:

if (!function_exists('chkconfig')) {
    // declare your function
}

这样,如果它确实存在,你就不必再重新声明它了