Is there a way to get PHP to release this file?
am 02.03.2010 00:08:20 von Andrew Ballard
I am editing a data file via ODBC, and would like to be able to
download the updated file in the same transaction when finished. It
seems, however, that even after calling odbc_close(), PHP still
retains a lock on the file for the duration of the request. Is there a
way to get PHP to release the file? (Ideally, I'd prefer to work in
memory and/or streams altogether rather than saving the changes to a
file, but I'm not sure that's possible with odbc_connect.) I guess if
I have to I can issue a redirect to a second process that would
download the file, but I'd prefer having to pass a one-time URL to the
browser where it will end up in the history.
Andrew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Is there a way to get PHP to release this file?
am 02.03.2010 00:21:18 von Shawn McKenzie
Andrew Ballard wrote:
> I am editing a data file via ODBC, and would like to be able to
> download the updated file in the same transaction when finished. It
> seems, however, that even after calling odbc_close(), PHP still
> retains a lock on the file for the duration of the request. Is there a
> way to get PHP to release the file? (Ideally, I'd prefer to work in
> memory and/or streams altogether rather than saving the changes to a
> file, but I'm not sure that's possible with odbc_connect.) I guess if
> I have to I can issue a redirect to a second process that would
> download the file, but I'd prefer having to pass a one-time URL to the
> browser where it will end up in the history.
>
> Andrew
I would redirect back to the same script and use a get parameter or a
session var and an if to tell if you should update the file or download it.
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php