来自php的Python脚本不提供任何输出

This is my php script

<HTML>
<head>
    <h1>Hello</h1>
</head>
  <body>
    <?php
 $command=escapeshellcmd('~/PycharmProjects/Test_1/wiki_update.py 2 2>&1');
 $output=shell_exec($command);
 echo $output;
 ?>
</body>   
 </HTML>

I get no output when I run it through the browser.

When I change the $command=escapeshellcmd('whoami');

it outputs as NOBODY,

I granted permission to nobody for that python script still no output.

I am using xampp for linux and php script in htdocs/xampp.

Are you sure you don't need to change your command to run python?

 $command=escapeshellcmd('python ~/PycharmProjects/Test_1/wiki_update.py 2 2>&1');

You also might try specifying absolute path - the ~ alias changes based on current user (which is the web server's user, not yours).