In this paper, we present a method for measuring arbitrary-order correlation functions of the light field using a two-level atomic system. Theoretically, light field information should be mapped onto the atomic system after the light interacts with the atom. Therefore, we can measure the atomic system and thus obtain information about the light field. We study two typical models, the p-photon Jaynes–Cummings model, and the p-photon Tavis–Cummings model. In both models, we find that the pth-order correlation function of an unknown light field ...