olivia/os-info

应用程序轻松解析和显示宿主系统的信息。

1.0 2018-04-21 11:24 UTC

This package is not auto-updated.

Last update: 2024-09-23 06:28:13 UTC


README

应用程序轻松解析和显示宿主系统的信息。

安装程序

	composer require olivia/os-info

使用

基本

	$info = new Olivia\OsInfo\OSInfo(
		new Linfo\Linfo
	);

	// Cpu
	echo $info->getCpu();

Laravel 或其他 PHP 框架

	use Olivia\OsInfo\OSInfo;

	$info = app(OSInfo::class);

	// Cpu
	echo $info->getCpu();

API

  • getCpu() : string
  • getServer() : string
  • getMemory() : string
  • getMysqlVersion(string $host = '127.0.0.1', string $username = 'root', ?string password = null) : string
  • getPHPVersion() : string
  • getUploadMaxFileSize() : string