How do I tell if I have cancer or just a fungi infection?

You can not. Go to your doctor he will examine, order tests including biopsy then he will tell it is fungal infection or cancer.
See your doctor. It is not practical to provide a short, meaningful answer to your question. It would be prudent to consult your doctor.