...

View Full Version : problem in connectting OLE/COM object in PHP



sureshmsse
01-12-2006, 04:52 AM
hi,
i face with a problem in connectting fma using com object.
Word is open and operated successfully....
----------------------------------------------------------
<?php
$word = new COM("word.application") or die("Unable to instantiate Word");
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("Sample open");
$word->Documents[1]->SaveAs("c:\\test.doc");
$word->Quit();
$word = null;
?>
--------------------------------------------------------
But FMA mobile agent is not connected properly.
code as follows
=============================================
<?
$FMA = new COM("MobileAgent.MobileAgentApp") or die("fma fail");
echo "Object created";
echo $FMA;
if ($FMA->Connect)
echo "connected";
else
echo "not connected";
echo "sam";
$FMA->SentMessage("Sample auto reply", "+919865865865", 0, 0, 0);
$FMA->Disconnect;
$FMA->Exit;
?>
=========================================
output shows as:
object created
Error: unable to connect $FMA->Connect;
A need a help from you.

sureshmsse
01-17-2006, 04:39 AM
:mad: Please any one try to help me.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum