When you work with a server (local server too) the root of the urls/links must be the server, not your computer.
For example, in your case, if the root folder of your server is ‘SMIS’ the correct URL will be “http://localhost/SMIS/Files/6.pdf“
When you work with a server (local server too) the root of the urls/links must be the server, not your computer.
For example, in your case, if the root folder of your server is ‘SMIS’ the correct URL will be “http://localhost/SMIS/Files/6.pdf“
I try to put a link to a file in my page, such that, once a user clicks the link – the browser downloads the file.
HTML:
<a href="correct_path...." download>downloadable link</a>
Here is the image shows the full path of the link:
And here is the image shows the file does exist:
So why, when I click the link NOTHING happens? it doesn’t download..
what is the exact path / code that you are using? please share that
@NabeelKhan it contains
can you share an example html output that you see?
Open the developer tools. Look at the console. It probably says something like
You need to output the link relative to the http:// url of the current page, not the php directory. Find the http path of the folder and use it instead. So you should instead use: