System commands can be executed from PHP using exec command.
eg:
$out = array(); $command = "memcat --server=10.10.10.10 ITEMS > /tmp/items.txt";The $out variable would hold the output of the command. If there is any issue with executing a command , have the command with path.
exec($command, $out);
eg: $command = "/usr/local/bin/memcat --server=10.10.10.10 ITEMS > /tmp/items.txt";for further info: http://www.php.net/manual/en/function.exec.php
exec($command, $out);
0 comments
Post a Comment