Jump to content

HREFs not finding path for MySQL file uploaded


dennishall

Recommended Posts

Hi:

I'm a newby regarding uploading files to MySQL, turning report output into an HREF, and getting MySQL data via a hyperlink.

 

I have successfully uploaded, files to MySQL, I have also been able to display filename information as a hyperlink in report output, but when I click on the hyperlink, I get the following message format on a 404 page:

The requested URL /current_dir_of_requesting_page/filename.filetype was not found on this server.

 

My reporting page has teh following line of code in a report table to create the hyperlink:

<td style="width:225px"><? echo "<a href=".$row['name'].">".$row['name']."</a>";?></td>

 

Can anyone assist me with this?

So if I understand correctly...

 

"/current_dir_of_requesting_page/filename.filetype" is the value of the field in your database?

 

Or is it different within your database?

 

OR, is that you giving us the template of all the errors your getting?

Have you checked that the path is actually correct? Tried removing that first slash?

Tried an absolute path instead of relative?

"/current_dir_of_requesting_page/filename.filetype" is the result I see in teh 404 page.

 

The informations stored in the name field in my db is only the filename.filetype.

 

What am trying to return when the href is clicked is the MySQL path and filename.filetype.

Example:

I upload file.pdf to my db

The user sees file.pdf in the name field of teh result page

The user clicks the file.pdf link in teh name field and gets the following:

ERROR 404 page: /cms/file.pdf not found.

 

btw: /cms/ is teh dir that I'm running the result page in.

 

My question is: How do I define teh path to the file in the MySQL db?

 

Best Regards

I didn't even know MySQL could hold pdf files. I got some reading to do!

But, a quick google search found this you may be interested in reading:

http://www.wellho.net/resources/ex.php4?item=h110/pdfget.php

That being said, no idea how to make it into an HTML link off the cuff.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.