Posted By

tclancy on 04/19/10


Versions (?)

PHP exec() on External Script File

 / Published in: PHP


I couldn't get PHP running a local Python script even when there were no permission problems. Trick was the '2>&1' at the end.

  1. $command = 'your command goes here';
  2. $output = exec($command . ' 2>&1', $output, $return);

Report this snippet  

You need to login to post a comment.