Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> How To Delete Files When Session Ends
vicky99
post Aug 14 2006, 05:12 AM
Post #1


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 28-May 06
Member No.: 13,691



Dear Friends
I need solution to a problem. The problem is as under:
I am creating certain files (playlist) in server disk when user selects some songs. The files are created in ram format. What I want to do is to delete these files created during a particular session. Is it possible to do so? Now I am deleting these files using on Unload event fired by JavaScript. I am using PHP.
Go to the top of the page
 
+Quote Post
TavoxPeru
post Aug 14 2006, 08:02 PM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 760
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579



I think it is possible to delete the files before the session is ended by using the unlink() php function, but you need the correct system priviligies to do it.

Best regards,
Go to the top of the page
 
+Quote Post
Hercco
post Aug 16 2006, 07:48 PM
Post #3


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



Or use a system call?
Go to the top of the page
 
+Quote Post
TavoxPeru
post Aug 19 2006, 09:22 AM
Post #4


Super Member
Group Icon

Group: [HOSTED]
Posts: 760
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579



QUOTE(Hercco @ Aug 16 2006, 02:48 PM) *

Or use a system call?

Yes you are right, it is another solution but many host servers for security reasons disable this functions so you can't use it.

Best regards,
Go to the top of the page
 
+Quote Post
Humphrey1988
post Aug 19 2006, 03:31 PM
Post #5


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 18
Joined: 19-August 06
Member No.: 15,398



QUOTE(vicky99 @ Aug 14 2006, 01:12 PM) *

Dear Friends
I need solution to a problem. The problem is as under:
I am creating certain files (playlist) in server disk when user selects some songs. The files are created in ram format. What I want to do is to delete these files created during a particular session. Is it possible to do so? Now I am deleting these files using on Unload event fired by JavaScript. I am using PHP.


Hi

I have just learnt how to do it. I think you can use the session_destroy() function. More information can be found at http://sg.php.net/session_destroy

I hope that the website would give you the answer that you are searching for.

Cheers.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php, Sql Lite: Storing Session's Data?(1)
  2. How Do I Create And Write To Files?(4)
  3. Php : Variables Included Dont Work In Functions(4)
  4. Deleting Files With PHP(6)
  5. Need Help - How To Remove Session ID From URL(6)
  6. Session And Security(0)
  7. User Authentication Session Handling Problems(14)
  8. How To Edit Php Files?(16)
  9. How To Delete File Using PHP Shell Script(3)
  10. Help To Transfer Files Within Hosting Space Using Php(4)
  11. Already Sent Session Cookies?(2)
  12. Php File Upload(3)
  13. Php Session Problem(7)
  14. Run A Script When Expires A Session(6)
  15. Reading Files And Folders(1)
  1. How To Protect Included Files(10)
  2. How To Create/edit/delete Ftp Accounts With Php(1)
  3. Magic Quotes And $_files(3)


 



- Lo-Fi Version Time is now: 7th October 2008 - 07:51 AM