且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP函数在某些情况下会陷入无限循环

更新时间:2021-10-03 00:43:49

在两个函数中都没有任何地方可能存在任何循环或递归.您的getLikes()函数很可能是从已发布代码之外的其他地方重复调用的.

There is no place whatsoever where there could be any looping or recursion in both of your functions. Most likely your getLikes() function is being called repeatedly from somewhere else that's outside of the posted code.

此处,存在一个类似的问题,表明Facebook授权可能会以某种方式出故障.我在此处包括该链接,因为也许您未显示一些代码可能会导致相同的行为.但是,这不仅仅是由您发布的代码引起的.

There is a somewhat similar question here, that suggests that Facebook authorization might be at fault somehow. I'm including the link here because maybe there is some code you're not showing that may cause the same behavior. However, it couldn't be caused just by the code you have posted.