URL中用到的一些编码方式
来源:互联网 发布:overture for mac 编辑:程序博客网 时间:2024/04/29 12:52
看到项目代码中有这样一些方法:urlencode, base64_encode,
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.
在页面间传递数据时可以使用到该方法。
它的返回值:
Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. It is encoded the same way that the posted data from a WWW form is encoded, that is the same way as in application/x-www-form-urlencoded media type. This differs from the » RFC 1738 encoding (see rawurlencode()) in that for historical reasons, spaces are encoded as plus (+) signs.
非文字、且不是-_.的,会被编码为百分号(%)打头的两位16进制数,空格被编码为加号。比如:"browse.myspace.cn/;:"被解析为"browse.myspace.cn%2F%3B%3A"。其中的/;:都被编码了。
string htmlentities ( string $string [, int $quote_style [, string $charset [, bool $double_encode ]]] )
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.
If you're wanting to decode instead (the reverse) you can use html_entity_decode().
string base64_encode ( string $data )
htmlentities等。
网上找了一些资料如下:
string urlencode ( string $str )它的返回值:
string htmlentities ( string $string [, int $quote_style [, string $charset [, bool $double_encode ]]] )
See Also
string base64_encode ( string $data )
Encodes the given data with base64.
This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.
Base64-encoded data takes about 33% more space than the original data.
一种编码方式,需要占用更多的空间。
在我们的项目中,为了获取一个url,用来供未登陆者,先登陆再返回当前页面使用,其中return_url指向当前页面。
$url = $ms_login_url_prefix;
- URL中用到的一些编码方式
- URL中文中用的utf-8编码?
- 毕业设计中用到的一些
- 一些javascript中用到的一些技巧
- DedeCMS中用到的字符编码转换
- DVC中用到的LDPCA编码
- URL查询串中用的utf-8编码?
- oracle中用到的一些英文
- sql入侵中用到的一些命令
- 一些工作中用到的小技巧
- 项目中用到的一些开源
- aspectJ中用到的一些概念
- js中用到的一些属性方法
- 编程中用到的一些算法
- ESB中用到的一些概念
- android_xml中用到的一些知识
- 一些工作中用到的脚本
- java开发中用到的一些配置文件
- Java Reflection (JAVA反射)详解
- IE下ActiveX控件的激活
- 天天亦周末 我的梦想啊~
- warning等的配置显示 -- 网站开发 php
- 工作两个月的总结
- URL中用到的一些编码方式
- php中测量程序运行时间
- php中运用http调用的GET和POST方法
- php中使用正则表达式匹配的函数
- 配完host后,ie无法打开页面
- 命令行进行http请求
- 上线中需要注意的东西
- php通过SoapClient进行SOA调用
- postgresql的使用方法