A new 1-[2-methyl-5-(4-tetraphenylporphyrinphenyl)-3-thienyl)-2-[2-methyl-3-thienyl]-cyclopentene (DTE-TPP) combined by 3,3’-(1-Cyclopentene-1,2-diyl)bis(5-chloro-2-methylthiophene) (DTE) and tetraphenylporphyrin (TPP) can transform between the open isomer and the closed isomer upon the irradiation of UV or visible light. Herein, they can be used to write binary data. Furthermore, the open form can emit luminescence but the closed cannot while irradiated in another light that can’t cause optical chemical reactions. Therefore, the data can be read out without damage.