定制 hestiacp/phpquoteshellarg 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hestiacp/phpquoteshellarg

最新稳定版本:v1.1.0

Composer 安装命令:

composer require hestiacp/phpquoteshellarg

包简介

Improved escape shell arguments for support of special charactars

README 文档

README

php quote shell arguments function ... doing a better job than php's builtin escapeshellarg(): https://3v4l.org/Hkv7h

Developed by https://github.com/divinity76/phpquoteshellarg

installation

the script is just a standalone .php file, you can just copypaste it.

another alternative is to use composer:

composer require 'hestiacp/phpquoteshellarg'

usage

<?php
require_once(__DIR__ . '/vendor/autoload.php');
use function Hestiacp\quoteshellarg\quoteshellarg;

$str="æøå\x01";
var_dump(["str"=>$str,"escapeshellarg"=>escapeshellarg($str), "quoteshellarg"=>quoteshellarg($str)]);

may outputs something like

array(3) {
  ["str"]=>
  string(7) "æøå�"
  ["escapeshellarg"]=>
  string(3) "'�'"
  ["quoteshellarg"]=>
  string(9) "'æøå�'"
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2022-07-17