|
|
|
|||||
|
slice:
class item; sequence<item> items; class item { string title; items children; }; ... item getitem(); ... server side implement code: itemPtr getitem() { itemPtr i = new item; i->title = "root"; itemPtr i2 = new item; i2->title = "sub1"; i->children.push_back( i2 ); itemPtr i3 = new item; i3->title = "sub2"; i2->children.push_back( i3 ); return i; } and PHP client side code: $nav = $obj->getitem(); function dump_nav( $mynav, $level ) { for ( $j = 0; $j != $level; ++ $j ) { echo " "; } echo $mynav->title; echo "<br/>"; $child_count = count($mynav->children); for ( $i = 0; $i != $child_count; ++ $i ) { ftr_dump_nav( $mynav->children[ i ], level + 1 ); } } dump_nav( $nav, 0 ); PHP client result: "root " the well result is: "root sub1 sub2" help me, please. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to pass binary char array to remote host efficiatively? | socketref | Help Center | 7 | 09-18-2005 10:15 AM |
| How to pass complex C++ containers in ICE? | jvme | Help Center | 1 | 08-04-2005 05:30 PM |
| Why the Chinese character pass between application write with C++ and C# has question | lotusqin | Help Center | 2 | 05-24-2005 08:46 PM |
| how to pass/receive value which I dont know at compilation time | kovacm | Help Center | 2 | 05-10-2005 05:35 PM |
| Semantics of pass by value for interface | chaukmean | Help Center | 2 | 11-27-2003 05:21 AM |