我如何计算在 CakePHP 中调用控制器操作的次数


How can I count how many times a controller action is called in CakePHP?

找出 CakePHP 应用程序中的控制器操作被调用了多少次的最佳方法是什么?

如果你在应用程序中不需要这个,这只是为了调试(听起来像)

我会设置 XDebug 和 Webgrind

这将为您提供调用计数以及函数的成本。