On 07/18/2013 03:05 AM, Yasuo Ohgaki wrote:
Hi,
You may use register_shutdown_function() to clean things up after exit()
http://jp2.php.net/manual/en/function.register-shutdown-function.php
So simply extract files to tmp dir and delete everything after execution.
I guess this is what you need.
I would expect that if the target application also registers a shutdown
function there could be problems, but its potential nesting is something
to look into.
I suppose it would also be possible to fork the application and delete
the temp file once the "child" fork had completed, which /might/ be less
prone to being overridden by an arbitrary application.
BTW, I don't think eval() is evil as long as programmers know what they
are doing.
Neither do I, but that in itself doesn't change the way it works. <g>
Thanks for your suggestion.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php