php-windows Digest 21 Sep 2003 13:33:23 -0000 Issue 1920
Topics (messages 21472 through 21474):
Re: php, excel - release problem
21472 by: Sven Schnitzke
Keep posted data
21473 by: ascll
21474 by: Sascha Kaufmann
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]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
use of excel constants is facilitated by php.ini setting
com.autoregister_typelibs on
This is better than explicitly loading typelibs because you won't
get rid of an explicitly loaded typelib anymore. As with the
stickyness of excel: Yes, it has been an issue in earlier releases
but AFAIK PHP 4.3 drops it correctly. I use $excel->Application->Quit(),
$excel->Release() and $excel = null;
However I recommend using register_shutdown_function() to make
sure Quit() and Release() are called even if the script does not run
thru.
Last hint: when developing a script using COM set error_reporting to
E_ALL and activate logging; check the logs because most of COMs
complaints (Wrong usage of COM objects) are just classified as warnings
by PHP. You only get an error if COM itself fails which is very much
unlikely as WIN itself is heavily relying on it.
Happy hacking
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Grzegorz Godlewski [SMTP:[EMAIL PROTECTED]
> Gesendet am: Samstag, 20. September 2003 23:48
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] php, excel - release problem
>
> Hello
>
> I have following script:
>
> $MyEx = new COM("Excel.Application",null,CP_UTF8) or Die ("Did not connect");
> $xls = &$MyEx->application->Workbooks->Open(getcwd()."\\arkusz.xls") or Die ();
> $xls->close(false);
> $xls->release();
> unset($xls);
>
> $MyEx->quit();
> $MyEx->release();
> unset($MyEx);
>
> After exiting php (4.3.3) excel is still in memory.
> Does it correctly work for anybody?
>
>
> Without opening xls it's ok (however useless):
>
> $MyEx = new COM("Excel.Application",null,CP_UTF8) or Die ("Did not connect");
> $MyEx->quit();
> $MyEx->release();
> unset($MyEx);
>
>
> BTW. is there a way to use Excel constants - eg. for borderaround method?
>
> BR
> --
> \ Grzegorz Godlewski /
> / Mail: ggodlewski()pld-linux.org GG: 1600799 ICQ UIN: 118261503 \
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Greetings,
I'm using
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
to post the data on my form to the database. Once I posted the data, those
data disappear from the form. So, is that a way for me to keep my posted
data on the form?
Thanks in advance.
ascll
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
well, maybe you can use this
<input type="text" name="field" value="<?php if ($_POST['field'])
{ echo $_POST['field']; } else {} ?>">
regards
Sascha
ascll wrote:
Greetings,
I'm using
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
to post the data on my form to the database. Once I posted the data, those
data disappear from the form. So, is that a way for me to keep my posted
data on the form?
Thanks in advance.
ascll
[EMAIL PROTECTED]
--- End Message ---