I'm mostly lucky in this regard. The vast majority of what I do doesn't require me to be in the office, so if I'm even slightly sick, I send an email that I'm staying home and no one bats an eye. OTOH, I still have to get my work done that day no matter how bad I feel (barring a very serious illness) or I'll wind up playing catch up for the near future.