Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
致命错误:第 1160 行 C:\xampp\htdocs\project\App\library\PEAR\MDB2\Driver\mysql.php 中允许的内存大小为 33554432 字节已用尽(试图分配 51 个字节)
我有一个大型数据库(1.5GB),当我尝试通过数据库搜索信息时出现了该错误。我不知道如何解决?如果有人能提供帮助,谢谢。:-)
除了您可能在代码上执行的一些疯狂循环之外,您可能会收到该错误的最直接原因是如果您完全忽略了数据库的使用并试图将其全部加载到 PHP中。
但这太疯狂了!:)
如果您选择的数据库是基于 SQL 的,请尝试以下操作:
SELECT * (...) LIMIT 20 // to get the first xx results only
作为旁注,您正在使用大型数据库进行学习,因为大多数新手错误(例如非索引表和类似的东西将立即显而易见),这很好。