मैं इस त्रुटि हो रही है होना चाहिएPHP7 method_exists Uncaught त्रुटि:</p> <blockquote> <p>Fatal error: Uncaught Error: Function name must be a string in</p> </blockquote> <p>इस कोड के लिए:: समारोह नाम एक स्ट्रिंग
if (function_exists($item['function'])) {
$item['function']($item, $default);
} elseif (method_exists($this, $item['function'])) {
$this->$item['function']($item, $default);
}
मुझे पता है कि
if (function_exists($item['function'])) {
$item['function']($item, $default);
} elseif (method_exists($this,$item['function'])) {
$this->{$item['function']}($item, $default);
}
करने के लिए कोड को बदलने
उस त्रुटि को हल किया गया, लेकिन मेरा सवाल है, यह लाइन
01 होनी चाहिए$item['function']($item, $default);
भी
{$item['function']}($item, $default);
लिए परिवर्तित किया जा या है जहां उसे छोड़ा जा सकता है?
क्या आप वाकई इस आइटम फ़ंक्शन कुंजी सेट हैं और यह स्ट्रिंग है? इसका उपयोग करने से पहले चेक जोड़ें। – Svetoslav