如何清理register_shutdown_function

问题描述 投票:0回答:2

在test.php中

function close() {
echo "end";
}
register_shutdown_function("close");
exit();

当我调用方法“exit()”结束时。我希望什么也看不到。 如何清理寄存器功能或跳过此操作。

php
2个回答
1
投票

这应该可以解决问题

register_shutdown_function(function() {}); 

© www.soinside.com 2019 - 2024. All rights reserved.