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
其他信息
- 授权协议: Unlicense
- 更新时间: 2022-07-17