function drupal_base64_encode

drupal_base64_encode($string)

Returns a URL-safe, base64 encoded version of the supplied string.

Parameters

$string: The string to convert to base64.

Return value

string

File

includes/bootstrap.inc, line 2219
Functions that need to be loaded on every Drupal request.

Code

function drupal_base64_encode($string) {
  $data = base64_encode($string);
  // Modify the output so it's safe to use in URLs.
  return strtr($data, array('+' => '-', '/' => '_', '=' => ''));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_base64_encode/7.x