0
我有一個擴展PDO類的類。它被稱爲數據庫。但是在一個特定的函數commit()函數中,它會得到一個內存溢出錯誤。爲什麼擴展PDO會導致內存溢出?
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261900 bytes) in C:\wamp\www\igadgets\application\includes\base\classes\database.php on line 130
的功能是:
function commit() {
return $this->commit();
}
好奇的是:當我改變我的課不延伸PDO了,但只包含它的變量,錯誤消失。
這工作得很好:
function commit() {
return $this->pdo->commit();
}
這是爲什麼?
哇!甚至沒有注意到!謝謝^^ – 2010-09-22 15:39:25
簡潔明瞭。 「你的代碼錯了。」 – webbiedave 2010-09-22 15:43:17