55379c90df
修改了上一个版本的一些错误,第一次提交
44 lines
843 B
PHP
44 lines
843 B
PHP
<?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>';
|
|
}
|
|
}
|