Skip to content

Magento 2: Generate a HTML or PHP file from controller

I want to generate and download a html or a php file when a controller is called. Any help would be appreciated.