By using the line ratio ion{C}{4}$lambda1549$/ion{C}{2}$lambda1335$ as a tracer of ionization ratio of the interstellar medium (ISM) illuminated by a long gamma-ray burst (LGRB), we identify a global photoionization response of the ionization ratio to the photon luminosity of the prompt emission assessed by either $L_{mathrm{iso}}/E_{mathrm{peak}}$ or $L_{mathrm{iso}}/E^2_{mathrm{peak}}$. The ionization ratio increases with both $L_{mathrm{iso}}/E_{mathrm{peak}}$ and $L_{mathrm{iso}}/E^2_{mathrm{peak}}$ for a majority of the LGRBs in our sample, although there are a few outliers. The identified dependence of ion{C}{4}/ion{C}{2} on $L_{mathrm{iso}}/E^2_{mathrm{peak}}$ suggests that the scatter of the widely accepted Amati relation is related with the ionization ratio in ISM. The outliers tend to have relatively high ion{C}{4}/ion{C}{2} values as well as relatively high ion{C}{4}$lambda1549$/ion{Si}{4}$lambda1403$ ratios, which suggests an existence of Wolf-Rayet stars in the environment of these LGRBs. We finally argue that the outliers and the LGRBs following the identified ion{C}{4}/ion{C}{2}$-L_{mathrm{iso}}/E_{mathrm{peak}}$ ($L_{mathrm{iso}}/E^2_{mathrm{peak}}$) correlation might come from different progenitors with different local environments.