PDA

View Full Version : Download folder on main site root


Heckie
07-08-2009, 01:42 AM
I'm at the final stage of building an MP3 music shop but have run into a problem.

I have uploaded my files into the root folder but cannot get DFP2 to link to them. It worked fine in testing when the source folder was inside www.

Here's what I have done so far:
I have added a folder /home/username/downloads

The page the will start the downloads is mydomain.com/accounts/orderdetails.php
(/home/username/public_html/accounts/orderdetails.php)

For testing the source folder was mydomain.com/downloads

On the orderdetails.php DFP behaviour, I have listed the folder as /home/username/downloads

How do I link to the files? Do I need to change permissions, any suggestions?

Ray Borduin
07-08-2009, 07:37 AM
You cannot link directly to files outside of the web root. You would have to use file download that is included with Digital file pro to give access to download files outside of the root.

Heckie
07-08-2009, 08:32 AM
Thats what I've done, I've added /home/username/downloads into the Digital File Pro 2 wizard but it doesn't work…

I'm wondering if I need to format the path to folder differently i.e. ../../../home/username/downloads - (I tried this but no luck)

Any help would be appreciated!

Ray Borduin
07-08-2009, 08:52 AM
<?php echo(realpath('../../../home/username/downloads')); ?>

that would give you the correct path to use, or you could just use the code as it appears I think.

Heckie
07-08-2009, 10:21 AM
Do I enter that line of code into the DFP wizard?

Ray Borduin
07-08-2009, 11:22 AM
As the path... I think so..

Or just put it on top of your page and view the page to see the path.

Then copy and paste the acutal path in the DFP wizard.

Heckie
07-09-2009, 01:32 AM
Got it Ray - path should have simply been ../../downloads.