Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question problem in connectting OLE/COM object in PHP

    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.

  • #2
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please any one try to help me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •