We report a systematic study on the low-temperature thermal conductivity (kappa) of R_2Ti_2O_7 (R = Gd and Er) single crystals with different directions of magnetic field and heat current. It is found that the magnetic excitations mainly act as phonon scatterers rather than heat carriers, although these two materials have long-range magnetic orders at low temperatures. The low-T kappa(H) isotherms of both compounds show rather complicated behaviors and have good correspondences with the magnetic transitions, where the kappa(H) curves show drastic dip- or step-like changes. In comparison, the field dependencies of kappa are more complicated in Gd_2Ti_2O_7, due to the complexity of its low-T phase diagram and field-induced magnetic transitions. These results demonstrate the significant coupling between spins and phonons in these materials and the ability of heat-transport properties probing the magnetic transitions.