Calling php from php through exec() gives no result

前端 未结 6 965
无人及你
无人及你 2021-01-14 06:24

I have a PHP script that creates other PHP files based on user input. Basically, there are files containing language specific constants (define) that can be tra

6条回答
  •  既然无缘
    2021-01-14 07:15

    I had the same problem. The solution that worked for me was found in running-at-from-php-gives-no-output. I needed to add output redirection.

    $output = exec("php -l $filename 2>&1");
    

提交回复
热议问题