更新时间:2026-07-03 GMT+08:00
分享

url_encode1

url_encode函数用于将字符串编码为application/x-www-form-urlencoded MIME格式。

命令格式

url_encode1(string [, string ])

参数说明

参数

是否必选

参数类型

说明

input

STRING

要输入的字符串。

encoding

STRING

指定编码格式,支持GBK或UTF-8等标准编码格式,不输入默认为UTF-8。

返回值说明

返回STRING类型的值。

input或encoding值为NULL时,返回NULL。

示例代码

返回Example+for+url_encode%3A%2F%2F+dsf%28fasfs%29

select url_encode1('Example for url_encode:// dsf(fasfs)', 'GBK');

相关文档