note 30549 added to function.shell-exec
| From: | ron dot petty at unigeek dot com | Date: | Fri, 21 Mar 2003 17:40:22 +0000 |
| Subject: | note 30549 added to function.shell-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45614@lists.php.net to get a copy of this message | ||
Here is an example on how to install software using php
shell_exec("cd /usr/local/src/; gunzip program.tar.gz; tar xvf program.tar; cd program;
./configure; make; make install);
Now depending if your root or not some commands like "make install" may fail. This
doesn't do any error checking, the reason for that is I do not know how to cd to a directory
and then execute another command unless they are in the same shell.
So basically, take what you type on the command line and string them together.
--
http://www.php.net/manual/en/function.shell-exec.php
http://master.php.net/manage/user-notes.php?action=edit+30549
http://master.php.net/manage/user-notes.php?action=delete+30549
http://master.php.net/manage/user-notes.php?action=reject+30549