Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Link Issue

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
I am trying to access a .txt file from my webpage. First off, I am pulling the file name from my database.

Click on the link and the file should open, however, it doesn't.

Here's my code:

<td><span class="style3"><a href="file://<?php echo $LibLoc."\\".$row_RecordSet1['name']; ?>"><?php echo $row_Recordset1['name']; ?></a></span></td>

What is strange is that the name will display in the cell but not in the href statement.

Now if I hard code the file name, File11.txt, it works.

I'm totally confused. Can someone shed some light on this for me?

Thx
 
disregard....it is now working the original way i tried it

<a href="file://<?php echo $LibLoc."/".$row_RecordSet1['name'];?>

strange....not sure why i didn't work at first and now it is. oh well.....
 
Does the file in question reside on the filesystem of the computer on which you are running your web browser?

The "file://" URL designator only makes sense for files that are on your workstation. If the file is going to be sent by the server to your workstation, you must use "


Want the best answers? Ask the best questions! TANSTAAFL!
 
yes..files were located locally thus the use of the file://
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top