In this study, a real-time and real-space time-dependent density functional theory (TDDFT) is applied to describe nonlinear electron-photon interactions during a resonant femtosecond laser pulse train photoionization of a Na 4 cluster. The effects of key pulse train parameters, such as the spatial/temporal pulse energy distribution, pulse number per train, pulse separation and pulse phase on resonant absorption, are discussed. The calculations show that the resonant effect and the nonlinear electron dynamics, including energy absorption, electron emission, dipole response and ionization probability, can be controlled by shaping the ultrafast laser pulse train.