The Cardinals outgained the 49ers 129-15 in the opening quarter and held San Francisco without a first down.
But that didn’t last long.
Arizona ended a six-game stretch without a touchdown pass when Hoyer hit Michael Floyd on a late 37-yard score. Floyd had eight catches for 166 yards.
The Cardinals pounded the ball toward the right side of San Francisco’s defensive line where Pro Bowler Justin Smith had been stout against the run all season before getting hurt two weeks ago. Now, San Francisco has an extra week for Smith to heal.
‘‘Today’s game kind of mirrored our season,’’ Whisenhunt said. ‘‘I'm proud of the way our team’s worked. You understand this is part of the business. We haven’t won enough games this year.’’
Former starting quarterback Alex Smith made what could have been his final appearance in a 49ers uniform when he entered the game with 5:57 to go — playing to chants of ‘‘Let’s Go, Alex!’’ and ‘‘Alex! Alex!’’
‘‘It was humbling,’’ Smith said. ‘‘It was very surreal.’’