I am a bit new in wordpress development and don’t get everything, as simple as it can be. I am currently developing a plugin to browse and read files in an external ftp server. I used the ftp function from php, and it is so far working well.
However, I am encountering a little problem, I wrote the most part of my plugin in class-myPluginName-public.php, and in this file I am using a tag to redirect to another page: download.php?file=file_name . In this page there will be a function called to download a file with a query var, and then the user will be redirected back to the index page of the plugin.
BUT my problem is that I don’t know how to create this download.php page, as even if I create a page download.php in my plugin folder I need to write some code to make it a real page without having to create a new page in the admin panel.
I hope I explained clearly, and that you can help me.
Thanks in advance
Read more here: How can I create a page for my plugin?