How to make php script run another php script

前端 未结 9 1357
小蘑菇
小蘑菇 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

    To run a second script on the same server

    $appUrl = $_SERVER['HTTP_HOST'];
    $path = 'second.php';//your path here
    $appUrl = 'http://'.$appUrl.'/'.$path;
    file_get_contents($appUrl);
    

提交回复
热议问题