You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
843 B
44 lines
843 B
5 years ago
|
<?php
|
||
|
/*
|
||
|
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
|
||
|
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
|
||
|
Site: http://scripts.incutio.com/xmlrpc/
|
||
|
Manual: http://scripts.incutio.com/xmlrpc/manual.php
|
||
|
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* IXR Base64编码
|
||
|
*
|
||
|
* @package IXR
|
||
|
*/
|
||
|
class IXR_Base64
|
||
|
{
|
||
|
/**
|
||
|
* 编码数据
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
private $data;
|
||
|
|
||
|
/**
|
||
|
* 初始化数据
|
||
|
*
|
||
|
* @param string $data
|
||
|
*/
|
||
|
public function __construct($data)
|
||
|
{
|
||
|
$this->data = $data;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取XML数据
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getXml()
|
||
|
{
|
||
|
return '<base64>' . base64_encode($this->data) . '</base64>';
|
||
|
}
|
||
|
}
|