The heat from the sub and amp would compliment each other, creating a very hot situation. At best it would shorten the lifespan of your equipment. If the amp is running at its minimum impedance already, it might even shut down the first time you run it hard for any length of time.
But then again, if its a small amp, it might run fine. But it WILL shorten its lifespan, likely the sub too. Its just a bad idea to mount an amp inside the speaker box under most circumstances.
Ported boxes do not circulate air in and out of them, only pump (basically) the same air in and out of them rapidly and repeatedly (20 to 100 times per second). Very little air is exchanged in this process, its not like an air pump that's pumping air through the enclosure like alot of people think.