Sys
class Sys extends SysEnv
Class Sys
Methods
Returns if the file descriptor is an interactive terminal or not.
run a command in background
No description
Method to execute a command in the sys Uses : 1. system 2. passthru 3. exec 4. shell_exec
No description
No description
No description
支持查看指定目录,默认当前目录 CLI: php test.php -d=path php test.php --dir=path WEB: /test.php?dir=path
Details
in SysEnv at line 24
static bool
isUnix()
in SysEnv at line 34
static bool
isLinux()
in SysEnv at line 42
static bool
isWin()
in SysEnv at line 50
static bool
isWindows()
in SysEnv at line 58
static bool
isMac()
in SysEnv at line 66
static bool
isRoot()
in SysEnv at line 78
static string
getHostname()
in SysEnv at line 86
static string
getNullDevice()
in SysEnv at line 101
static boolean
isSupportColor()
Returns true if STDOUT supports colorization.
This code has been copied and adapted from \Symfony\Component\Console\Output\OutputStream.
in SysEnv at line 124
static boolean
isInteractive(int|resource $fileDescriptor)
Returns if the file descriptor is an interactive terminal or not.
at line 21
static
execInBackground(string $cmd)
run a command in background
at line 37
static mixed
exec(string $command, null|string $logfile = null, null|string $user = null)
at line 70
static array
runCommand($command, bool $returnStatus = true)
Method to execute a command in the sys Uses : 1. system 2. passthru 3. exec 4. shell_exec
at line 114
static string
getTempDir()
at line 137
static int|string
getCpuUsage(string $program)
at line 152
static int|string
getMemUsage($program)
at line 172
static
gitCheck()
支持查看指定目录,默认当前目录 CLI: php test.php -d=path php test.php --dir=path WEB: /test.php?dir=path