将pdf文件保存在文件夹中,然后通过链接下载 [英] Keeping pdf files in a folder and than download them via link
本文介绍了将pdf文件保存在文件夹中,然后通过链接下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个网站。我正在开发它以发展自己。
我的数据库包含3个表格。 1代表内容。
我为pdf文件目录分隔了一列(类型为varchar)。 ie(files / pdffiles / example.pdf)
问题是:我怎样才能添加真正的文件目录并指出确切的pdf。
我如何通过点击链接下载到我的电脑?
这是我的代码;
Hello everyone,
I have a website. I am developing it to develop myself.
My Database conists of 3 tables. 1 is for the content.
I seperated a column for the pdf file directory(type is varchar). ie (files/pdffiles/example.pdf)
The problem is that;how can i add the true file directory and point the exact pdf.
and how can i download it to my computer by clicking the link?
Here is my code;
<section class="accordionMod">
<div class= "yardimbaslik">
<h2 title = "U ve Ü harfiyle başlayan yardım konuları"> <span>U-Ü</span></h2>
</div>
<?php
$sql =mysql_query("SELECT * FROM problemler WHERE baslik LIKE 'U%' or baslik LIKE 'Ü%' ORDER BY baslik ASC") or die("SORGU HATASI");
while ($row = mysql_fetch_array($sql)) {
$baslik = $row['baslik'];
$icerik = $row['icerik'];
$youtube_link = $row['youtube_link'];
$pdf_link = $row['pdf_link'];
$download_link = $row['download_link'];
$oy_orani = $row ['oy_orani'];
?>
<div>
<h3 class="accordion-toggle"><?echo $baslik?></h3>
<section class="accordion-inner">
<div class ="sosyal_buton">
<a href=<?php echo $download_link ?>><img src = "themes/images/indir.png"></a><a href=<?php echo $pdf_link.'.pdf'?>><img src = "themes/images/pdf.png"></a><a href=<?php echo $youtube_link ?>><img src = "themes/images/youtube.png"></a>
</br>
<br/>
</div>
<div class = "icerik_alt">
<p><?php echo $icerik?></p>
</div>
</div>
<?php
}
?>
</section>
推荐答案
sql = mysql_query( SELECT * FROM problemler WHERE baslik LIKE'U%'或baslikLIKE'Ü%'order by baslik ASC)或 die( SORGU HATASI);
while (
sql =mysql_query("SELECT * FROM problemler WHERE baslik LIKE 'U%' or baslik LIKE 'Ü%' ORDER BY baslik ASC") or die("SORGU HATASI"); while (
row = mysql_fetch_array(
row = mysql_fetch_array(
sql)){
sql)) {
这篇关于将pdf文件保存在文件夹中,然后通过链接下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文