Why cannot Apache handle multiple requests at the same time?

后端 未结 8 621
执笔经年
执笔经年 2021-01-31 21:23

I have AMPPS installed.

My Apache server cannot handle multiple php requests at once (for example if I call localhost/script.php multiple times, they are pr

8条回答
  •  春和景丽
    2021-01-31 21:50

    manipulate yours sessions, write on start of script.php

    // manipulate writes, and unlock session file!
    session_start();
    $_SESSION['admin'] = 1;
    $_SESSION['user'] = 'Username';
    session_write_close(); // unlock session file, to another script can access
    
    // start your script without php session block
    sleep(30); 
    echo $_SESSION['user'];
    
    // another script can run without wait this script finish
    

提交回复
热议问题