Abdullah bin Hasan reported,

in Makkah, so I asked him about this hadith and he narrated it to me. He said, when he entered he would say, "My Lord, open for me the gate of Your mercy," and when he left he would say, "My Lord, open for me the gate of Your bounty."

Tirmidhi 315

Daif

و قال علي بن حجر قال إسمعيل بن إبراهيم فلقيت

عبد الله بن الحسن

بمكة فسألته عن هذا الحديث فحدثني به قال كان إذا دخل قال رب افتح لي باب رحمتك وإذا خرج قال رب افتح لي باب فضلك

الترمذي 315ضعيف
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
What to say when entering the masjid
Numbering
Darussalam 315
Tirmidhi 315