I have a apache server running on raspberry pi and i want to execute shell script using command through in php,
the code which is to be executed is :
"usr/bin/libreoffice --pt trial1 /var/www/html/Book1.xlsx"
how to run this command ?
I have a apache server running on raspberry pi and i want to execute shell script using command through in php,
the code which is to be executed is :
"usr/bin/libreoffice --pt trial1 /var/www/html/Book1.xlsx"
how to run this command ?
2
Answers
use shell_exec() built in php function here
you can also used built in function exec() or system() here see
use
shell_exec()
to run shell script.And also make sure that exec and shell_exec is enabled in PHP ini.