In the MySQL table, I created a column that stores the path to the file on a local disk and instead of downloading the file by reference, the php script itself is downloaded.

echo "<a href='" .$i['Книга']. "'download>Сюда</a> 

Here is the path: C: \ WebServers \ home \ digitallibrary.ru \ www \ books \ Pushkin_A_Ruslan_I_Lyudmila.a6.pdf

  • Give more information about how the path is prescribed. And why download? Here's what you need to get <a href="/pdf/book1.pdf"> TEXT </a> - Hardc0re
  • The download attribute is required to download the book by reference. - santaasus s
  • and what if in the <a> tag just the path to the file is specified, it is not downloaded anymore? - Nikolaj Sarry
  • In this case, the book will be the same. - santaasus s
  • Did you forget to put a question mark before download ? echo "<a href='" .$i['Книга']. "'?download>Сюда</a> echo "<a href='" .$i['Книга']. "'?download>Сюда</a> - Ostin

0