Hi!
I'm writing a little program to help me study. This program is supposed to open a document for me in OpenOffice. But that does not work. My code is as follows:
exec('/usr/bin/ooffice -writer "' . $_GET['file'] . '"');
echo exec('whoami');
The exec('whoami'] was simply put in to check if exec() works, and it does. That statement prints "www-data", but OpenOffice does not want to start although the command seems to be right. If I do:
print('/usr/bin/ooffice -writer "' . $_GET['file'] . '"');
and copy the result into a terminal in bash, it works perfectly.
Has anyone run across this error before? Is there any other way of opening a document in PHP that you know of?
Rasmus