CakeFest 2024: The Official CakePHP Conference

oauth_urlencode

(PECL OAuth >=0.99.2)

oauth_urlencodeURI を RFC 3686 形式でエンコードする

説明

oauth_urlencode(string $uri): string

URI を » RFC 3686 形式でエンコードします。

パラメータ

uri

エンコードしたい URI。

戻り値

» RFC 3686 形式でエンコードした文字列を返します。

add a note

User Contributed Notes 1 note

up
-1
bohwaz
13 years ago
Note that php5.3 rawurlencode will do exactly the same thing.

For PHP 5.2, easy replacement to this function :

<?php

function rfc3986_encode($str)
{
$str = rawurlencode($str);
$str = str_replace('%E7', '~', $str);
return
$str;
}

?>
To Top