Click here to Skip to main content
15,889,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
<?php
$result = mysql_query("SELECT * FROM tbl_prakas");

while($row = mysql_fetch_array($result)){
                                                                                $row['pkpathfile'];
}
?>

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
Posted
Comments
Uday P.Singh 8-Dec-11 13:49pm    
what exactly are you trying to achieve after getting the file?

1 solution

The problem has nothing to do with this code. It shows just what the query retrieves for you, and it retrieves everything (why everything, by the way?) stored in this table. So the problem was where you stored the data, nowhere else.

By the way, who needs the URLs of localhost, ever? As such, they are unusable anyway. Do I have to explain why?

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900