Posted By

tclancy on 04/19/10


Tagged


Versions (?)

PHP exec() on External Script File


 / Published in: PHP
 

URL: http://www.bigresource.com/Tracker/Track-php-D1qoCq9R/

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.