I have to pass an array from a php file to python file but my code is giving output NULL

前端 未结 2 530
迷失自我
迷失自我 2020-12-22 00:00

PHP code:



        
2条回答
  •  萌比男神i
    2020-12-22 00:35

    Add 2>&1 (stdout & stderr) behind the command like so:

    $result = shell_exec('C:/Python27/python C:/xampp/htdocs/123.py ' . escapeshellarg(json_encode($data)) . ' 2>&1');
    

提交回复
热议问题