xmlrpc_set_type

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

xmlrpc_set_type为一锟斤拷 PHP 锟街凤拷锟斤拷值锟斤拷锟斤拷 xmlrpc 锟斤拷锟斤拷锟酵★拷base64 锟斤拷锟斤拷锟斤拷时锟斤拷

说锟斤拷

xmlrpc_set_type ( string &$value , string $type ) : bool

为一锟斤拷 PHP 锟街凤拷锟斤拷值锟斤拷锟斤拷 xmlrpc 锟斤拷锟斤拷锟酵★拷base64 锟斤拷锟斤拷锟斤拷时锟斤拷

Warning

锟剿猴拷锟斤拷锟斤拷实锟斤拷锟斤拷锟侥★拷锟剿猴拷锟斤拷锟侥憋拷锟襟,帮拷锟斤拷锟斤拷锟狡硷拷锟斤拷锟斤拷锟斤拷牡锟斤拷锟斤拷锟斤拷锟斤拷锟轿达拷锟斤拷锟� PHP 锟斤拷锟斤拷锟芥本锟斤拷未通知锟酵憋拷锟睫改★拷使锟矫憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟皆碉拷 锟斤拷

锟斤拷锟斤拷

value

Value to set the type

type

'base64' or 'datetime'

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷 If successful, value is converted to an object.

锟斤拷锟斤拷

Example #1 A xmlrpc_set_type() example

<?php

$params 
date("Ymd\TH:i:s"time());
xmlrpc_set_type($params'datetime');
echo 
xmlrpc_encode($params);

?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
 <value>
  <dateTime.iso8601>20090322T23:43:03</dateTime.iso8601>
 </value>
</param>
</params>

锟斤拷锟斤拷锟届常

Issues E_WARNING with type unsupported by XMLRPC.