PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

variant_abs> <com_release
Last updated: Mon, 26 Nov 2007

view this page in

com_set

(PHP 4)

com_set — 给 COM 组件的属性赋值

描述

void com_set ( resource $com_object , string $property , mixed $value )

设置由 com_object 所引用的对象的 property 属性值。成功则返回新设置的值,出错则返回 FALSE

Example#1 不要使用 com_set() ,使用 OO 语法代替

<?php
   
// do this
   
$obj->property $value;
   
// instead of this:
   
com_set($obj'property'$value);
   
?>

Note: 本函数在 PHP 5 中不存在,应该使用常规的并更自然的面向对象语法来访问属性或调用方法。



add a note add a note User Contributed Notes
com_set
dan at kuykendall dot org
16-Aug-2002 10:38
This should also work using the newer OOP style that is still undocumented.

<?php
$obj
= new COM('Some.app');
$obj->somevar = 'somevalue';
?>

variant_abs> <com_release
Last updated: Mon, 26 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites