gpt4 book ai didi

recursion - PHP中 "Fatal error: Maximum function nesting level of ' 10 0' reached, aborting!"的解决方案

转载 作者:IT老高 更新时间:2023-10-28 11:45:50 25 4
gpt4 key购买 nike

我创建了一个函数,可以在一个 html 文件中查找所有 URL,并对链接到已发现 URL 的每个 html 内容重复相同的过程。该函数是递归的,可以无限执行。但是,我通过设置一个全局变量来限制递归,这会导致递归在 100 次递归后停止。

然而,php返回这个错误:

Fatal error: Maximum function nesting level of '100' reached,aborting! inD:\wamp\www\crawler1\simplehtmldom_1_5\simple_html_dom.php on line1355

ERROR

我在这里找到了解决方案:Increasing nesting function calls limit但这对我来说不起作用。

我引用了上述链接中的一个答案。请考虑一下。

"Do you have Zend, IonCube, or xDebug installed? If so, that is probably where you are getting this error from.

I ran into this a few years ago, and it ended up being Zend putting that limit there, not PHP. Of course removing it will let >you go past the 100 iterations, but you will eventually hit the memory limits."

有没有办法增加PHP中的最大函数嵌套级别

最佳答案

增加xdebug.max_nesting_level的值在你的 php.ini

关于recursion - PHP中 "Fatal error: Maximum function nesting level of ' 10 0' reached, aborting!"的解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8656089/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com