gpt4 book ai didi

php - 是否可以在 PHP 中延迟 HTTP 响应?

转载 作者:可可西里 更新时间:2023-11-01 16:23:56 25 4
gpt4 key购买 nike

我使用 JAVA 生成对 PHP 页面的 POST 请求(例如:192.168.1.2/index.php)我想在 30 秒后获得响应消息。如果可能的话,请给我解决方案。非常感谢任何帮助

最佳答案

在您的 PHP 脚本的顶部:

<?php

set_time_limit(0);
sleep(30);

// Do stuff here

关于php - 是否可以在 PHP 中延迟 HTTP 响应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8882252/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com