問題描述
我正在使用 MysqliDb 類.
I am using MysqliDb Class from there.
https://github.com/ajillion/PHP-MySQLi-Database-Class/blob/master/MysqliDb.php
當(dāng)我在本地電腦上使用時(shí),我沒有任何問題.但是我昨天買了主機(jī).我大約 5 分鐘前上傳了我的文件,但不起作用.我檢查了我的主機(jī)并創(chuàng)建了 error_log 文件和這個(gè)..
When i used on local pc, i don't have any problem. But I bought host yesterday. And I uploaded my files about 5 min ago and doesn't work. I checked my host and created error_log file and this..
PHP Fatal error: Allowed memory size of 75497472 bytes exhausted (tried to allocate 4294967296 bytes) in /home/(..)/MysqliDb.php on line 417
這是什么問題?
我在我的配置文件中使用了這段代碼.但同樣沒有奏效.
I used this code on my config file. But same didn't work.
ini_set('memory_limit', '192M');
推薦答案
我認(rèn)為那是您在數(shù)據(jù)庫中使用了 LongText.
I think that is that you are using LongText in your database.
請(qǐng)閱讀此消息:https://bugs.php.net/bug.php?id=51386
所以在 bind_result 之前嘗試mysqli::store_result.
So try to mysqli::store_result before bind_result.
這篇關(guān)于嘗試使用 MySQLi 時(shí)內(nèi)存耗盡的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!