quinta-feira, novembro 03, 2016

Raspberry Pi Run .py script from PHP and include a folder.

Raspberry Pi • View topic - Run .py script from PHP and include a folder.





vim /etc/sudoers



#add-lines

sudo pkexec visudo

www-data ALL=/etc/script.d/test.py NOPASSWD





vim index.php



<?php exec('sudo python /etc/script.d/test.py'); ?>

Nenhum comentário: