php删除cookie(不能通过set_cookie)

I'm trying to delete my cookie when user click on logout link. But i cant do it via set_cookie and set -time. There appears header modify error - its already sent. Is there any other way to delete cookie?

You must delete the cookie before printing any text/html.

You have to delete any cookies before cookies are sent to the browser along in headers. You are getting this error because you are likely trying to unset a cookie after some sort of output has been sent to the browser. This is not allowed and will not work.