unlink alternatives

They have: 2 posts

Joined: Jan 2006

Hi, I need for a file to be deleted from server soon after its created. I have heard that unlink is a dangerous thing to do. What's a better alternative? Thanks

Get your free Flash Contact Forms for your website.
Coming soon: Flash Attachment Email

They have: 36 posts

Joined: Mar 2006

Unlink is only dangerous if you're not careful about what you're doing. Don't allow any way for users to specify what's being deleted and you're fine.

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

Agreed. I use unlink, no problem. But I never allow users to specify what's being deleted. Just program smart, and you'll have no problem.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.