Jump to content

Unlink a file after Reading it


ibanez270dx

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
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.