We investigate the transmitted spectra of a few-cycle ultrashort pulse in an inversion-asymmetric medium with a permanent dipole moment (PDM). Our results show that even-order harmonics can be generated in this medium. Moreover, the generated even-order harmonics depend strongly on the carrier-envelope phase (CEP) of initial incident few-cycle ultrashort pulses. Physical analysis of the re-emitted spectra of the medium reveals that the CEP-dependent spectral effect is originated from the inversion-asymmetric structure and the corresponding PDM effects: two-photon transition dominates in the nonlinear process and further induces the generations of the even-order harmonics. Furthermore, the orientation relation between the electric field peak of the pulse and the PDM results in even-order harmonic generations depending on the CEP.