User Tools

Site Tools


uphp:functions:base64_encode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:functions:base64_encode [2017/04/06 11:42]
jeff
uphp:functions:base64_encode [2021/09/13 05:57]
Line 1: Line 1:
-======base64_encode====== 
  
-<badge>WMPRO FW >= 1.893</badge> <badge>WMMEGA FW >= 2.0</badge> 
- 
-Return the base64-encoded version of a <html><b><span style="color:green">string<span style="color:black"></b></html> 
- 
-====Description==== 
- 
-<well size="sm"> 
-<html> 
-<span style="font-size:125%;color:green">string 
-<span style="color:black"> 
-</html> 
-[[base64_encode]] ( 
-<html> 
-<span style="color:green">string 
-<span style="color:blue">$data 
-<span style="color:black">) 
-</html> 
-</well> 
- 
-Encodes data using MIME Base64((The term Base64 is generic, and there are many implementations. MIME, which stands for Multi-purpose Internet Mail Extensions, is the most common that is seen today. It is used wherever there is a need to transmit strings that might contain special characters that would otherwise be interpreted, blocked or converted during transmission, for example, sending a password string to a server. Encoding data in Base64 results in it taking up roughly 33% more space than the original data. MIME Base64 encoding uses an '=' character at the end of a string to signify whether the last character is a single or double byte.)) 
- 
-====Parameter==== 
- 
-<html><b><span style="color:blue">$data<span style="color:black"></b></html>:  A <html><b><span style="color:green">string<span style="color:black"></b></html> to encode 
- 
-====Return Value==== 
- 
-MIME Base64 encoded <html><b><span style="color:green">string<span style="color:black"></b></html> (or <html><b><span style="color:green">int<span style="color:black"></b></html> 0 for error) 
- 
-====Example==== 
- 
-<code php> 
-<? 
-  $data="This will be an encoded string"; 
-  print(base64_encode($data)); 
-?> 
-</code> 
- 
-The above example will output: 
-<code> 
-VGhpcyB3aWxsIGJlIGFuIGVuY29kZWQgc3RyaW5n  
-</code> 
- 
-====See Also==== 
- 
-[[base64_decode()]] - Decode a base64-encoded <html><b><span style="color:green">string<span style="color:black"></b></html> 
uphp/functions/base64_encode.txt · Last modified: 2021/09/13 05:57 (external edit)