Jump to content

Archived

This topic is now archived and is closed to further replies.

ibanez270dx

Unlink a file after Reading it

Recommended Posts

Hi,
I have a script that dynamically creates an .XLS, saves it on the server, and then opens it ... but I want to delete it after the user exits the .XLS. I used the unlink($myfile) command on the line after I used meta tags to open the .XLS automatically, but it deleted before it even opened. If I can just dynamically create the excel and open it without saving to my server first, that would be even better. Anybody know something that can help me out?

Any help is appreciated,
- Jeff

Share this post


Link to post
Share on other sites
[quote]You can do this using Javascript.[/quote]

You can't delete (unlink) a file on the server with javascript.  At best, and maybe what you are thinking, you can use AJAX to notify the server that a browser window has been closed, but if the file is being viewed in Excel, then JS can't tell when Excel is closed.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.