weixin_33744141 2013-11-13 06:10 采纳率: 0%
浏览 33

在php中对AJAX调用进行线程化

hello.php

is my file responding to AJAX call through javascripts by users.

now if e.g two users, username A and B send their GET request to hello.php at same time. In hello.php i made code to sleep for 5 min if user is A but will generate instant response if user is B. Now will the response generated by hello.php will be recieved by B or both A&B?

Or in short Can PHP thread a function itself if it is called by two users at a same time like explained above.

  • 写回答

3条回答 默认 最新

  • 叼花硬汉 2013-11-13 06:13
    关注

    Each request will be handled independently.
    What response will be sent to user is depended only on the code you made in Hello.php
    You dont need to worry about time of requests done. Apache handles that for us
    Response of user A will be sent to user A only and same for user B and every other user.
    I will like to hear more on this from others who have different opinion

    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料