Metainformationen zur Seite

LBSystem::get_binaries

$binarray = LBSystem::get_binaries();

 LoxBerry's configuration saves execution paths to common binaries to stay system independend. As the required binary exists in the binary list, you should favor the variable instead of hard-coding the execution pathes in your plugin.LBSystem::get_binaries() returns an array with keys of the binaries.

See the list of available keys (binaries). The array value is the binary name including absolute path.

 

Key
APT
AWK
BASH
BZIP2
CHMOD
CHOWN
CURL
DATE
GREP
GZIP
MAIL
NTPDATE
POWEROFF
REBOOT
SENDMAIL
SUDO
TAR
UNZIP
WGET
ZIP

 

Usage

require_once "loxberry_system.php";
 
$bin = LBSystem::get_binaries();
 
echo "The binary to grep is " . $bin['GREP'];
 
system("$bin['ZIP'] myarchive.zip *");