The Senators have won three games in a row for the first time since March 2008.
Foligno scored a backbreaking goal with just 14 seconds remaining in the second period to give the Senators a 3-0 lead.
Antero Niittymaki allowed all five scores on 23 shots to end the Flyers' two-game winning streak. Niittymaki had gone 5-1 with a 2.07 goals-against average in his previous six appearances.
Elliott did not allow a goal until Darroll Powe's slapshot got past him 8 minutes deep in the third.