I'm creating a webpage where the user will be able to download an .iso file. The version of the iso will change. For example: xxxx.1.iso will become xxxx.2.iso when the iso is updated. How do I code the download button so that I don't need to re-code the button when the version changes. If I were to create a download subdirectory, and the .iso file was kept there do you think this would work if the only file in the download subdirectory is the .iso file.
<?php $files = array_slice(scandir('/download/'), 2); ?> <div class="navbar-custom"> <a class="btn-solid-lg page-scroll" href="/Download/" download=$files>Download the App</a> </div>
If you know of a better way to code this, I'd appreciate the input.
Thanks in advance,