weixin_33726318 2014-11-26 06:32 采纳率: 0%
浏览 12

Ajax -PHP用例

is there any "in-use"-case for the specific PHP-file in AJAX?

For example: On my website there are numerous AJAX scripts running simultanious. The PHP script is already in use for a AJAX script. What does it mean for the other AJAX scripts? Do they connect to a new instance of the PHP script or what? Or am I completely wrong?

  • 写回答

2条回答 默认 最新

  • weixin_33724046 2014-11-26 06:46
    关注

    As @mudasobwa said PHP is (most of the times) stateless. It's not really PHP which is stateles, but it is HTTP which is a stateless protocol.

    So that means every request is completely seperate from each other and they don't know anything about the request before or after. That's why there are things like SESSION, POST and GET to send or share information accross multiple PHP (HTTP) requests.

    Also note this is the reason why you need to do things like authentication, database connection and query data every request.

    评论

报告相同问题?