The Health Protection Agency (HPA) said pupils and staff at Cross Lane Primary School in Elland had been affected by the Shigella bacteria, which can cause diarrhoea and vomiting.
The HPA said that nine cases had been confirmed and more than 50 people had displayed symptoms over the last three weeks.
The school will reopen on 15 October.

