Environment-dependent photon emission from solid state carbon dots and its mechanism.