A new three-dimensional zinc-based metal-organic framework as a fluorescent sensor for detection of cadmium ion and nitrobenzene.