在Web-hook事件之后,Require_once无法正常工作

We are using acuity web-hook for send appointment data to our software.The data send to below php file.

workflow.php

require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/header.php');
$cmd = 'echo "hii3" > debug.log';
echo "<pre>".shell_exec($cmd)."</pre>";
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php";

If I use require_once then trigger did not goes to header.php, but when I use include then the trigger goes to header.php.

You can use

var_dump(file_exists($_SERVER["DOCUMENT_ROOT"].'/bitrix/header.php'));

to verify that the file actually exists. If not the require_once() will throw an error. Aside from that the behavior of include() and require() is the same.