The present invention relates to a method for prophylactically treating or treating a viral disease, comprising administering to a subject in need thereof a dihydropyrimidine compound, and the viral diseases include, but are not limited to, Hepatitis A, Hepatitis B, Hepatitis C, influenza, herpes and acquired immunodeficiency syndrome (AIDS).