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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

"/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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.