How to make php script run another php script

前端 未结 9 1352
小蘑菇
小蘑菇 2021-02-07 15:45

I\'m trying to do exactly the same thing as in my previous Python question, but in PHP. See my previous (answered) question

PHP script from previous question does someth

9条回答
  •  醉酒成梦
    2021-02-07 16:17

    You can do it by placing header('Location: second.php'); at the end of first.php and again at the end of second.php to start executing third.php and so on. Even you can create cycles between two scripts, i.e after ending first.php, second.php will be started and after executing second.php again the first.php, again second.php and so on.

    But remember, this is a browser dependent feature and how many script can be executed one after another, totally depends on how many times that browser permits redirection. I found mozilla allows 23 redirections, that means you can executes 23 scripts one after another.

提交回复
热议问题