PHP FILTER_SANITIZE_ENCODED 过滤器
PHP 教程
· 2019-01-25 20:11:55
定义和用法
FILTER_SANITIZE_ENCODED 过滤器去除或 URL 编码不需要的字符。
该过滤器与 urlencode() 函数很类似。
- Name: "encoded"
- ID-number: 514
可能的标志:
- FILTER_FLAG_STRIP_LOW - 去除 ASCII 值在 32 以下的字符
- FILTER_FLAG_STRIP_HIGH - 去除 ASCII 值在 32 以上的字符
- FILTER_FLAG_ENCODE_LOW - 编码 ASCII 值在 32 以下的字符
- FILTER_FLAG_ENCODE_HIGH - 编码 ASCII 值在 32 以上的字符
实例
<?php $url="http://www.codercto.com"; var_dump(filter_var($url,FILTER_SANITIZE_ENCODED)); ?>
代码的输出如下所示:
string(29) "http%3A%2F%2Fwww.codercto.com"
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Complexity and Approximation
G. Ausiello、P. Crescenzi、V. Kann、Marchetti-sp、Giorgio Gambosi、Alberto M. Spaccamela / Springer / 2003-02 / USD 74.95
This book is an up-to-date documentation of the state of the art in combinatorial optimization, presenting approximate solutions of virtually all relevant classes of NP-hard optimization problems. The......一起来看看 《Complexity and Approximation》 这本书的介绍吧!