views:

86

answers:

2

I have a PHP app and I need to delete a client-side file. How can I achieve that?

I'm new to PHP. Hope someone can help me.

Thanks.

+8  A: 

You can't, browsers won't allow it, full stop.

You could if you wrote a browser/ActiveX/Java plugin that has that kind of access and got the user to install it, but please don't.

deceze
+1, but I think that smaller paragraph should actually be bolder :)
alex
@alex No, it actually shouldn't be there at all. You **can't** delete client-side files, full stop. :o)
deceze
@deceze Well, I meant the `please don't` part :)
alex
@alex Ah, I see. Done. :)
deceze
+2  A: 

You can't do this for obvious security reasons. PHP is server side only.

Steve