We propose a scheme of optical one-way transmission by using one-dimensional photonic crystals (PhCs) with diffraction gratings on one side. The one-way transmission is realized by making the PhC opaque to the zeroth diffraction order and transparent to another propagating (in air) diffraction order. For such a structure with 10-period PhC, 93% of the incident energy passes through when an electromagnetic wave impinges from one side, and the transmittance decreases to the order of 0.001% as the electromagnetic wave illuminates from the other side.