Файловый менеджер - Редактировать - /home/skymarketplace/public_html/uploads/XML_RPC.zip
Назад
PK �~�Zb��)) ) tests/actual-request.phpnu �[��� <?php /** * Actually performs an XML_RPC request. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: actual-request.php 300957 2010-07-02 23:55:00Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.5.3 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC/Dump.php'; $debug = 0; $params = array( new XML_RPC_Value('php.net', 'string'), ); $msg = new XML_RPC_Message('domquery', $params); $client = new XML_RPC_Client('/api/xmlrpc', 'www.adamsnames.com'); $client->setDebug($debug); $resp = $client->send($msg); if (!$resp) { echo 'Communication error: ' . $client->errstr; exit(1); } if ($resp->faultCode()) { /* * Display problems that have been gracefully cought and * reported by the xmlrpc.php script */ echo 'Fault Code: ' . $resp->faultCode() . "\n"; echo 'Fault Reason: ' . $resp->faultString() . "\n"; exit(1); } $val = $resp->value(); XML_RPC_Dump($val); PK �~�Z�B� tests/allgot.incnu �[��� <?php /** * Parses the "return" value from some of our test scripts. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: allgot.inc 293223 2010-01-07 15:32:19Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.4.4 */ ob_start(); function returnAllGot($params) { $out = ''; $count = count($params->params); for ($i = 0; $i < $count; $i++) { $param = $params->getParam($i); if (!XML_RPC_Value::isValue($param)) { $out .= "parameter $i was error: $param\n"; continue; } $got = XML_RPC_Decode($param); $out .= "param $i: " . var_export($got, true) . "\n"; } $val = new XML_RPC_Value($out, 'string'); return new XML_RPC_Response($val); } $server = new XML_RPC_Server( array( 'allgot' => array( 'function' => 'returnAllGot', ), ) ); $got = ob_get_clean(); if ($got == $expect) { echo "passed\n"; } else { echo "FAILED\n"; echo "Expected:\n$expect\n"; echo "Got:\n$got\n"; } PK �~�Z|�E tests/empty-value-struct.phpnu �[��� <?php /** * Tests how the XML_RPC server handles a parameter with an empty struct without * any spaces in the XML after the empty value. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: empty-value-struct.php 300957 2010-07-02 23:55:00Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.4.4 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC/Server.php'; $GLOBALS['HTTP_RAW_POST_DATA'] = <<<EOPOST <?xml version="1.0"?> <methodCall> <methodName>allgot</methodName> <params> <param> <value> <struct> <member> <name>fld1</name><value></value></member></struct></value> </param> </params> </methodCall> EOPOST; $expect = <<<EOEXP <?xml version="1.0" encoding="UTF-8"?> <methodResponse> <params> <param> <value><string>param 0: array ( 'fld1' => '', ) </string></value> </param> </params> </methodResponse> EOEXP; include './allgot.inc'; PK �~�Z$]�� � tests/empty-value.phpnu �[��� <?php /** * Tests how the XML_RPC server handles parameters with empty values. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: empty-value.php 300957 2010-07-02 23:55:00Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.4.4 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC/Server.php'; $GLOBALS['HTTP_RAW_POST_DATA'] = <<<EOPOST <?xml version="1.0"?> <methodCall> <methodName>allgot</methodName> <params> <param><value><string></string></value></param> <param><value>first</value></param> <param><value> </value></param> <param><value></value></param> </params> </methodCall> EOPOST; $expect = <<<EOEXP <?xml version="1.0" encoding="UTF-8"?> <methodResponse> <params> <param> <value><string>param 0: '' param 1: 'first' param 2: ' ' param 3: '' </string></value> </param> </params> </methodResponse> EOEXP; include './allgot.inc'; PK �~�ZJ��� � tests/encode.phpnu �[��� <?php /** * Tests encoding values. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: extra-lines.php 293218 2010-01-07 14:20:08Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.5.3 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC.php'; $input = array(10, 11, 12); $expect = <<<EOT <?xml version="1.0" encoding="UTF-8"?> <methodCall> <methodName>nada</methodName> <params> <param> <value><array> <data> <value><int>10</int></value> <value><int>11</int></value> <value><int>12</int></value> </data> </array></value> </param> </params> </methodCall> EOT; $expect = trim(preg_replace("/\r\n/", "\n", $expect)); $msg = new XML_RPC_Message('nada', array(XML_RPC_encode($input))); $msg->createPayload(); $actual = trim(preg_replace("/\r\n/", "\n", $msg->payload)); if ($actual == $expect) { echo "passed\n"; } else { echo "PROBLEM\n"; echo $actual; } $msg = new XML_RPC_Message('nada', array( new XML_RPC_Value( array( new XML_RPC_Value(10, 'int'), new XML_RPC_Value(11, 'int'), new XML_RPC_Value(12, 'int'), ), 'array' ) ) ); $msg->createPayload(); $actual = trim(preg_replace("/\r\n/", "\n", $msg->payload)); if ($actual == $expect) { echo "passed\n"; } else { echo "PROBLEM\n"; echo $actual; } PK �~�Z.�� � � tests/extra-lines.phpnu �[��� <?php /** * Tests how the XML_RPC server handles parameters with empty values. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: extra-lines.php 300958 2010-07-02 23:58:51Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.4.4 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC.php'; $input = "First lfs\n\nSecond crlfs\r\n\r\nThird crs\r\rFourth line"; $expect_removed = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>nada</methodName>\r\n<params>\r\n<param>\r\n<value><string>First lfs\r\nSecond crlfs\r\nThird crs\r\nFourth line</string></value>\r\n</param>\r\n</params>\r\n</methodCall>\r\n"; $expect_not_removed = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<methodCall>\r\n<methodName>nada</methodName>\r\n<params>\r\n<param>\r\n<value><string>First lfs\r\n\r\nSecond crlfs\r\n\r\nThird crs\r\n\r\nFourth line</string></value>\r\n</param>\r\n</params>\r\n</methodCall>\r\n"; $msg = new XML_RPC_Message('nada', array(XML_RPC_encode($input))); $msg->createPayload(); if ($msg->payload == $expect_removed) { echo "passed\n"; } else { echo "PROBLEM\n"; } $msg = new XML_RPC_Message('nada', array(XML_RPC_encode($input))); $msg->remove_extra_lines = false; $msg->createPayload(); if ($msg->payload == $expect_not_removed) { echo "passed\n"; } else { echo "PROBLEM\n"; } PK �~�Z�3l�* * tests/protoport.phpnu �[��� <?php /** * Tests that properties of XML_RPC_Client get properly set * * Any individual tests that fail will have their name, expected result * and actual result printed out. So seeing no output when executing * this file is a good thing. * * Can be run via CLI or a web server. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: protoport.php 300957 2010-07-02 23:55:00Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.2 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC.php'; /** * Compare the test result to the expected result * * If the test fails, echo out the results. * * @param array $expect the array of object properties you expect * from the test * @param object $actual the object results from the test * @param string $test_name the name of the test * * @return void */ function compare($expect, $actual, $test_name) { $actual = get_object_vars($actual); if (count(array_diff($actual, $expect))) { echo "$test_name failed.\nExpect: "; print_r($expect); echo "Actual: "; print_r($actual); echo "\n"; } } if (php_sapi_name() != 'cli') { echo "<pre>\n"; } $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver'); compare($x, $c, 'defaults'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver'); compare($x, $c, 'defaults with http'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver'); compare($x, $c, 'defaults with https'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver'); compare($x, $c, 'defaults with ssl'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 65); compare($x, $c, 'port 65'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 65); compare($x, $c, 'port 65 with http'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 65); compare($x, $c, 'port 65 with https'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 65); compare($x, $c, 'port 65 with ssl'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 0, 'theproxy'); compare($x, $c, 'defaults proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 0, 'http://theproxy'); compare($x, $c, 'defaults with http proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 0, 'https://theproxy'); compare($x, $c, 'defaults with https proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 0, 'ssl://theproxy'); compare($x, $c, 'defaults with ssl proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 65, 'theproxy', 6565); compare($x, $c, 'port 65 proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 65, 'http://theproxy', 6565); compare($x, $c, 'port 65 with http proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 65, 'https://theproxy', 6565); compare($x, $c, 'port 65 with https proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 65, 'ssl://theproxy', 6565); compare($x, $c, 'port 65 with ssl proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 443, 'theproxy', 443); compare($x, $c, 'port 443 no protocol and proxy port 443 no protocol'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 0, 'ssl://theproxy', 6565); compare($x, $c, 'port 443 no protocol and proxy port 443 no protocol'); echo "\nIf no other output was produced, these tests passed.\n"; PK �~�Z� ��X X tests/test_Dump.phpnu �[��� <?php /** * Actually performs an XML_RPC request. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: test_Dump.php 300962 2010-07-03 02:24:24Z danielc $ * @link http://pear.php.net/package/XML_RPC */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC/Dump.php'; $val = new XML_RPC_Value(array( 'title' =>new XML_RPC_Value('das ist der Titel', 'string'), 'startDate'=>new XML_RPC_Value(mktime(0,0,0,13,11,2004), 'dateTime.iso8601'), 'endDate' =>new XML_RPC_Value(mktime(0,0,0,15,11,2004), 'dateTime.iso8601'), 'arkey' => new XML_RPC_Value( array( new XML_RPC_Value('simple string'), new XML_RPC_Value(12345, 'int') ), 'array') ) ,'struct'); XML_RPC_Dump($val); echo '==============' . "\r\n"; $val2 = new XML_RPC_Value(44353, 'int'); XML_RPC_Dump($val2); echo '==============' . "\r\n"; $val3 = new XML_RPC_Value('this should be a string', 'string'); XML_RPC_Dump($val3); echo '==============' . "\r\n"; $val4 = new XML_RPC_Value(true, 'boolean'); XML_RPC_Dump($val4); echo '==============' . "\r\n"; echo 'Next we will test the error handling...' . "\r\n"; $val5 = new XML_RPC_Value(array( 'foo' => 'bar' ), 'struct'); XML_RPC_Dump($val5); echo '==============' . "\r\n"; echo 'DONE' . "\r\n"; PK �~�Z��̢� � tests/types.phpnu �[��� <?php /** * Tests how the XML_RPC server handles a bunch of different parameter * data types. * * PHP versions 4 and 5 * * @category Web Services * @package XML_RPC * @author Daniel Convissor <danielc@php.net> * @copyright 2005-2010 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License * @version SVN: $Id: types.php 300957 2010-07-02 23:55:00Z danielc $ * @link http://pear.php.net/package/XML_RPC * @since File available since Release 1.4.4 */ /* * If the package version number is found in the left hand * portion of the if() expression below, that means this file has * come from the PEAR installer. Therefore, let's test the * installed version of XML_RPC which should be in the include path. * * If the version has not been substituted in the if() expression, * this file has likely come from a SVN checkout or a .tar file. * Therefore, we'll assume the tests should use the version of * XML_RPC that has come from there as well. */ if ('1.5.5' == '@'.'package_version'.'@') { ini_set('include_path', '../' . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); } require_once 'XML/RPC/Server.php'; $GLOBALS['HTTP_RAW_POST_DATA'] = <<<EOPOST <?xml version="1.0"?> <methodCall> <methodName>allgot</methodName> <params> <param><value>default to string</value></param> <param><value><string>inside string</string></value></param> <param><value><int>8</int></value></param> <param><value><datetime.iso8601>20050809T01:33:44</datetime.iso8601></value></param> <param> <value> <array> <data> <value> <string>a</string> </value> <value> <string>b</string> </value> </data> </array> </value> </param> <param> <value> <struct> <member> <name>a</name> <value> <string>ay</string> </value> </member> <member> <name>b</name> <value> <string>be</string> </value> </member> </struct> </value> </param> </params> </methodCall> EOPOST; $expect = <<<EOEXP <?xml version="1.0" encoding="UTF-8"?> <methodResponse> <params> <param> <value><string>param 0: 'default to string' param 1: 'inside string' param 2: '8' param 3: '20050809T01:33:44' param 4: array ( 0 => 'a', 1 => 'b', ) param 5: array ( 'a' => 'ay', 'b' => 'be', ) </string></value> </param> </params> </methodResponse> EOEXP; include './allgot.inc'; PK �~�Zb��)) ) tests/actual-request.phpnu �[��� PK �~�Z�B� q tests/allgot.incnu �[��� PK �~�Z|�E � tests/empty-value-struct.phpnu �[��� PK �~�Z$]�� � tests/empty-value.phpnu �[��� PK �~�ZJ��� � F tests/encode.phpnu �[��� PK �~�Z.�� � � W$ tests/extra-lines.phpnu �[��� PK �~�Z�3l�* * e- tests/protoport.phpnu �[��� PK �~�Z� ��X X �W tests/test_Dump.phpnu �[��� PK �~�Z��̢� � J` tests/types.phpnu �[��� PK � �j
| ver. 1.4 |
Github
|
.
| PHP 8.1.31 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка