承接 tivie/php-os-detector 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tivie/php-os-detector

最新稳定版本:1.1.0

Composer 安装命令:

composer require tivie/php-os-detector

包简介

A small utility library that detects the OS the server is running on

README 文档

README

Latest Stable Version Total Downloads License

A small PHP utility library that detects the OS the server is running on.

Compatibility

Although only tested in PHP 7, PHP OS Detector should be compatible with PHP 5.3 or greater

Installation

You can install it by cloning the git repository or using composer.

Git clone

git clone https://github.com/tivie/php-os-detector.git

Composer

Add these lines to your composer.json:

    {
        "require": {
            "tivie/php-os-detector": "*"
        }
    }

or run the following command:

php composer.phar require tivie/php-os-detector

Usage Example

$os = new \Tivie\OS\Detector();
$kernelName = $os->getKernelName();
if ($os->isUnixLike()) {
    echo "I'm using a Unix like system with kernel $kernelName";
} else if ($os->isWindowsLike()) {
    echo "I'm using a Windows like system with kernel $kernelName";
} else {
    echo "I'm using a non-Unix non-Windows system";
}

Contribute

Feel free to contribute by forking or making suggestions.

Issue tracker: https://github.com/tivie/php-os-detector/issues

Source code: https://github.com/tivie/php-os-detector

License

Command Library is released under Apache 2.0 license. For more information, please consult the LICENSE file in this repository or http://www.apache.org/licenses/LICENSE-2.0.txt.

统计信息

  • 总下载量: 1.6M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 3
  • 依赖项目数: 11
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: APACHE
  • 更新时间: 2014-12-19