承接 rosell-dk/locate-binaries 相关项目开发

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

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

rosell-dk/locate-binaries

最新稳定版本:1.0

Composer 安装命令:

composer require rosell-dk/locate-binaries

包简介

Locate a binaries by means of exec() or similar

README 文档

README

Build Status Coverage Software License Latest Stable Version Minimum PHP Version

Just a little class for locating binaries. You need exec(), shell_exec() or similar enabled for it to work. Otherwise, it will throw.

Works on Linux, Windows and Mac.

Usage

To locate installed cwebp binaries (found on Linux with which -a, falling back to whereis -b; on Windows found using where):

use LocateBinaries\LocateBinaries;

$cwebBinariesFound = LocateBinaries::locateInstalledBinaries('cwebp');

Note that you get an array of matches - there may be several versions of a binary on a system.

The library also adds another method for locating binaries by peeking in common system paths, such as usr/bin and C:\Windows\System32 However, beware that these dirs could be subject to open_basedir restrictions which can lead to warning entries in the error log. The other method is therefore best.

Well warned, here it is the alternative, which you in some cases might want to fall back to after trying the first.

$imagickBinariesFound = LocateBinaries::locateInCommonSystemPaths('convert');

Installing

Install with composer:

composer require rosell-dk/locate-binaries

Notes

The library uses the exec-with-fallback library in order to be able to use alternatives to exec() when exec() is disabled.

Do you like what I do?

Perhaps you want to support my work, so I can continue doing it :)

Thanks!

统计信息

  • 总下载量: 6.37M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04