How to code HTML download button where filename version will change |
How to code HTML download button where filename version will change |
larry78723 |
Mar 15 2020, 08:26 AM
Post
#1
|
Member Group: Members Posts: 39 Joined: 5-March 20 Member No.: 27,220 |
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> |
Lo-Fi Version | Time is now: 27th April 2024 - 07:47 AM |