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.
我想知道是否有一种技术可以在不执行整个过程的情况下测试钩子。hookActionObjectAddAfter 的示例我想测试它,而不必像客户端那样发出完整的命令。是否可以 ?有统一测试吗?
先感谢您
如果您在站点的根目录下创建了一个 test.php 文件,请输入以下代码:
require(dirname(__FILE__).'/config/config.inc.php'); Hook::exec('actionObjectAddAfter', array( array('object' => $params)));
在您的浏览器中,调用页面 yourdomain.tld/test.php
问候