A dual-function fluorescent probe for Hg (II) and Cu (II) ions with two mutually independent sensing pathways and its logic gate behavior.