PHP获取锚属性[重复]

Possible Duplicate:
How to get the value after the hash in “somepage.php#name”?

Is it possible to get an anchor name with PHP?

For example, for this URL:

http://domain.com/#departments

How can I get the text "departments"?

There is no way to get things after "#" in php, because this data is not provided to server, only url without data after "#", but if you are executing php script through JavaScript, you can Always split url into "#" and send the data as parameter or value of some hidden field.