Niners running back Christian McCaffrey scored two fourth-quarter touchdowns, and San Francisco's depleted defense shut down Philadelphia's offense.