The specific medication for coughing up white phlegm needs to be decided according to the cause of the disease, and the common causes are infection, allergy, and so on. 1. Infection: mainly refers to respiratory tract infections, including acute upper respiratory tract infections, acute and chronic bronchitis, pneumonia, etc., often coughing, coughing up white sputum, sore throat and other discomforts, common pathogens are bacteria, viruses, mycoplasma, fungi, etc., need to go to the hospital to check the blood, sputum culture, chest CT, etc., according to the different causes of the disease can be given amoxicillin, azithromycin, voriconazole, etc., can be given to assist the ammonia, bromelain and other phlegmatic treatment. Amoxicillin, azithromycin, voriconazole and so on can be taken according to different causes. 2. Allergy: Cough and sputum after exposure to certain allergens are commonly seen in cough variant asthma, which is a special type of bronchial asthma, and can be treated with prednisone and montelukast sodium tablets. Cough white sputum patients may also be caused by gastroesophageal reflux disease, post-nasal drip syndrome, etc., the need for timely medical diagnosis and treatment to clarify the cause of the disease, to give targeted treatment, the above drugs need to be standardized under the guidance of a professional physician and pharmacist, the rational application.