如何导入数据库中的路径以在PHP中下载? [英] How to import path in database to download in PHP?
本文介绍了如何导入数据库中的路径以在PHP中下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我对php代码有疑问.有一个表,其中包含用于存储文件路径的字段.然后,我想采用此路径进行下载.我该怎么做.我的表是tbl_prakas(id,pathfile);
这是PHP中的代码
Dear all,
I have a problem with php code. There is a table that contain field to store path of files. Then I want to take this path to download. How can I do it. My table is tbl_prakas(id, pathfile);
and here is code in PHP
<?php
$result = mysql_query("SELECT * FROM tbl_prakas");
while($row = mysql_fetch_array($result)){
$row['pkpathfile'];
}
?>
此代码仅显示此路径= http://localhost/Template_test_2/.我的文件路径是http://localhost/Template_test_2/pdf/prokas_670.pdf.
请帮我.谢谢
This code show path only this path =http://localhost/Template_test_2/. And my file path is http://localhost/Template_test_2/pdf/prokas_670.pdf.
Please help me. Thanks
推荐答案
结果 = mysql_query(" SELECT * FROM tbl_prakas"); while(
result = mysql_query("SELECT * FROM tbl_prakas"); while(
row = mysql_fetch_array(
row = mysql_fetch_array(
result)){
这篇关于如何导入数据库中的路径以在PHP中下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文