php-windows Digest 11 Sep 2001 09:58:04 -0000 Issue 749

Topics (messages 9307 through 9313):

Re: tutorials
        9307 by: leo g. divinagracia iii
        9311 by: George Pitcher

Re: Closing Excel using DCOM and Release()
        9308 by: Alain Samoun
        9312 by: jeff.waldock.blueyonder.co.uk

Fast Template PHP4 patch
        9309 by: Chris Burwell

Php and IIS dont stop loading...
        9310 by: Mattias Larsson

Re: mysql statment
        9313 by: Brad Thomas

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


i recommend books.

first one i picked up was WROX's "beginner php".  great cause it shows
you how to install it as well.  then it goes through the basics...

"Gillies, James V. & Cynthia L." wrote:
> 
> Do you know of any tutorials for PHP?

-- 
Leo G. Divinagracia III
[EMAIL PROTECTED]




I would recommend DevShed (www.devshed.com) as it's pretty much all well
written and fairly easy to follow and loads of exapmles.

George
----- Original Message -----
From: "leo g. divinagracia iii" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 10:53 PM
Subject: Re: [PHP-WIN] tutorials


> i recommend books.
>
> first one i picked up was WROX's "beginner php".  great cause it shows
> you how to install it as well.  then it goes through the basics...
>
> "Gillies, James V. & Cynthia L." wrote:
> >
> > Do you know of any tutorials for PHP?
>
> --
> Leo G. Divinagracia III
> [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Well, to close your Excel App, you will use:
xlApp->quit;
Talk about consistency from M$ ;)
For Excel, you may want to have a look at my class:
http://www.phpbuilder.com/columns/alain20001003.php3
It's becoming old now, but still has some value I guess.
Alain

On Mon, Sep 10, 2001 at 07:25:30PM +0100, Jeff Waldock wrote:
> Ok thanks!  That works fine for Word, but a similar techniques fails for
> Excel.
> I want to pull data from a spreadsheet - and have been trying to test out
> the technique using something like the code below.  Thiw works fine, insofar
> that the data are correctly displayed on the browser, but Excel is still
> running afterwards.  No error is give, but I need to be able to destroy the
> Excel object, or I will be quickly running out of resources!
> 
> The code is ...
> 
> <?php
> 
> echo "
> <HTML><HEAD><TITLE>Processing Form</TITLE></HEAD><BODY BGCOLOR=\"#D5D5AB\">
> <h1>This is a test</h1>";
> 
> $xlApp = new COM("Excel.Application") or Die ("Did not connect");
> $workbook = "d:\wwwroot\studentdata\xl1.xls";
> $wkb = $xlApp->Workbooks->Open($workbook) or Die ("Did not open");
> $sheets =  $wkb->Worksheets("Sheet1");
> $cell = $sheets->Cells(1,1);
> print "Cell Value = {$cell->value} <BR>";
> 
> $xlApp->ActiveWorkbook->Close("False");
> $xlApp->quit();
> $xlApp = null;
> 
> echo "</body></html>";
> 
> ?>
> 
> -----Original Message-----
> From: Alain Samoun [mailto:[EMAIL PROTECTED]]
> Sent: 10 September 2001 19:04
> To: Jeff Waldock
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release()
> 
> 
> To close Word, you should use:
> $word->quit();
> You are right, my PHPBuilder example has an error, thanks for pointing it to
> me ;)
> Alain
> 
> On Mon, Sep 10, 2001 at 06:30:20PM +0100, Jeff Waldock wrote:
> > Thanks for the comment, but this code was lifted from an example on
> > PHPbuilder.com!  The central problem is that the instance of Excel (or
> Word)
> > does not quit following $word->Quit(); I expected that the ->Release()
> > function would release the memory associated with the object, but it
> clearly
> > doesn't function because, as you say, it is not part of the Excel or Word
> > object model.  In which case ... how do it destroy the object?
> > Jeff Waldock
> >
> > -----Original Message-----
> > From: Alain Samoun [mailto:[EMAIL PROTECTED]]
> > Sent: 09 September 2001 21:55
> > To: Jeff Waldock
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release()
> >
> >
> > As it said, your COM connection is closed, in addition 'release' is not a
> > member in the word object as well as in  the excel object.
> > Alain
> >
> > On Sun, Sep 09, 2001 at 02:20:35PM +0100, Jeff Waldock wrote:
> > > I cannot seem to get PHP to recognise the Release function when tring to
> > > close an instance of Excel or Word opened using DCOM.
> > >
> > > This is the error message returned..
> > >
> > > Warning: Unable to lookup release: The object invoked has disconnected
> > from
> > > its clients. in d:\wwwroot\studentdata\word.php on line 21
> > >
> > > The code on line 21 is just
> > > $word->Release();
> > >
> > > The full code is::
> > > <?php
> > >
> > > // starting word
> > > $word = new COM("word.application") or die("Unable to instanciate
> Word");
> > > print "Loaded Word, version {$word->Version}\n";
> > >
> > > //bring it to front
> > > $word->Visible = 1;
> > >
> > > //open an empty document
> > > $word->Documents->Add();
> > >
> > > //do some weird stuff
> > > $word->Selection->TypeText("This is a test...");
> > > $word->Documents[1]->SaveAs("Useless test.doc");
> > >
> > > //closing word
> > > $word->Quit();
> > >
> > > //free the object
> > > $word->Release();
> > > $word = null;
> > >
> > > ?>
> > >
> > > Where am I going wrong?
> > >
> > > Jeff Waldock
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]








Thanks again - I've looked at your class as suggested (this was where I got the 
original example from!)

Unfortunately I still seem to get the same problem - the instance of Excel will not 
close on exit.  The code reads the data in cell 11,5 of the Excel file fine - it's ALL 
OK, I just can't get the Quit function to release the app!
Have you any idea why this happens and how I can fix it?  I've tried on several 
different machines with the same result.
Here is the code I've used ..

<?php 
echo " 
<HTML><HEAD><TITLE>Processing Form</TITLE></HEAD><BODY BGCOLOR=\"#D5D5AB\"> 
<h1>This is a test</h1>"; 
$xlApp = new COM("Excel.Application") or Die ("Did not connect"); 
$workbook = 'e:\wwwroot\temp\xxx.xls'; 
$wkb = $xlApp->Workbooks->Open($workbook) or Die ("Did not open"); 
$sheets = $wkb->Worksheets("Sheet1"); 
$cell = $sheets->Cells(11,5); 
print "Cell Value = {$cell->value} <BR>";  
$xlApp->ActiveWorkbook->Close("False"); 
$xlApp->Quit; 
$xlApp = null; 
echo "</body></html>"; 
?> 

----Original Message-----
From:   "Alain Samoun" <[EMAIL PROTECTED]>
Sent:   10 September 2001 22:36
To:     "Jeff Waldock" <[EMAIL PROTECTED]>
Cc:     "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject:        Re: [PHP-WIN] Closing Excel using DCOM and Release()

Well, to close your Excel App, you will use:
xlApp->quit;
Talk about consistency from M$ ;)
For Excel, you may want to have a look at my class:
http://www.phpbuilder.com/columns/alain20001003.php3
It's becoming old now, but still has some value I guess.
Alain





How do I patch Fast Template to PHP4? I see the code to do so on their web
site (http://www.thewebmasters.net/php/FastTemplate.phtml), but I do not
know where in class.fasttemplate.php3 to put that cade. Can someone help me
out? Any Help is greatly appreciated!






Hi all!

I have a little problem with PHP and IIS5.1 (Xp)

I have made a site or two with PHP and MySQL as the foundation and I used to
run Apache
as webserver. I'm now trying out IIS as a webserver and the response time is
great and it looks
good and all.

The problem is that the pages never stops loading. I don't have any infinate
loops or anything but
I usually make a for () loop to cycle through the response from the Mysql
queries and when they
are printed out the page just keeps loading. Nothing gets written to the
resulting webpage so I can't
see what could be wrong.

I use the included php.ini-dist file.

---
Mattias Larsson - [EMAIL PROTECTED]






"Angie Tollerson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Well, I've answered my own question!  Apparently, you cannot use the
addslashes function in the sql statement, not the way I am anyways.  Does
anyone know the proper way if any to do that without having to do a bunch of
extra coding before every sql statment just to addslashes? Thanks!
Angie

 <snip>

Set variables?
$alt_spelling2 = addslashes ($alt_spelling);
$description2  = addslashes ($description);

Brad




Reply via email to