一个perl URLencode URLdecode的方法 (2009-07-22 15:47:36)转载▼

来源:互联网 发布:linux 开源日志服务器 编辑:程序博客网 时间:2024/06/15 18:09
#引入模块

use URI::Escape;
#urlencode

$encoded = uri_escape("10% is enough\n"); 

#urldecode

$decoded  = uri_unescape($encoded);

 

结束了,perl用起来就是如此简单


uri_escape( $string )

uri_escape( $string, $unsafe )

uri_escape_utf8( $string )

uri_escape_utf8( $string, $unsafe )

uri_unescape($string,...)


0 0