duanpengya7074 2014-02-03 01:53
浏览 55
已采纳

PHP / cURL脚本请求另一个PHP脚本并在响应之前退出

I'd like a browser-initiated PHP script A on Server A to send a cURL request for a PHP resource B located on Server B, but not wait for a reply (it's only supposed to start script B and die). Will script B abort if it notices that the requesting script A has exited? If so, can this be overcome simply by including

ignore_user_abort(true);

in script B, just like for browser requests? What needs to be done to ensure script B goes to completion? Assume safe mode is enabled: no forking, daemons, etc, that's why I'm taking two separate servers.

  • 写回答

1条回答 默认 最新

  • duan010167787 2014-02-03 02:15
    关注

    Yes, if ignore_user_abort() is set to true on script B, then script B will continue to run, regardless of what A did. However, it is still at the mercy of the *max_execution_time* setting

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 给我一个openharmony跑通webrtc实现视频会议的简单demo项目,sdk为12
  • ¥15 vb6.0使用jmail接收smtp邮件并另存附件到D盘
  • ¥30 vb net 使用 sendMessage 如何输入鼠标坐标
  • ¥15 关于freesurfer使用freeview可视化的问题
  • ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
  • ¥15 求SC-LIWC词典!
  • ¥20 有关esp8266连接阿里云
  • ¥15 C# 调用Bartender打印机打印
  • ¥15 我这个代码哪里有问题 acm 平台上显示错误 90%,我自己运行好像没什么问题
  • ¥50 C#编程中使用printDocument类实现文字排版打印问题