Can't execute PHP script using PHP exec

后端 未结 6 1427
臣服心动
臣服心动 2020-11-30 03:42

I am trying to invoke a script which takes several seconds (web services with 3rd party) using the PHP exec call. After much struggling, I reduced this to the classic hello

6条回答
  •  青春惊慌失措
    2020-11-30 03:56

    if you are just simply running a php script one possible way to execute the entire code is to use the include() that will run the php file and output any results. You cannot direct the output to a text file but it should appear in the browser window if you're Hello World php script looks like

    
    

    then it will spit that out in the browser. So your second code would look like

    
    

    resulting in a page that would look like,

    Hello world! PHP ROCKS

提交回复
热议问题