The Philippines has ordered the evacuation of hundreds of thousands of people and cancelled dozens of flights.