delphi 编写的com 对象 用php调用 的 实例
delphi:
function Tmyxml.Get_xml: WideString;
begin
Get_xml:='wo shi a lei!';
end;
function Tmyxml.Get_xmldata: WideString;
var
xmlStr:string;
begin
xmlStr := '<?xml version="1.0" encoding="gb2312"?>';
xmlstr := xmlstr + '<user><name>张三</name><sex>男</sex></user>';
Get_xmldata:=xmlStr;
end;
php:
<?
$phpobj = new COM("abc.myxml");
echo $phpobj->xml;
echo $phpobj->xmldata;
//释放对象
$phpobj=null;
?>
实例下载:http://download.csdn.net/source/1976904