Copy link to clipboard
Copied
My site is on GoDaddy. I added Directory Privacy to a members-only folder. Once logged in, I have a link on the member page to a folder that, when accessed, will show the documents within for members to download. When I open locally within my browser, seems to work fine. But on-line, when I select the hot-link, I get a "FORBIDDEN - you don't have permission to access this resource. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request"
I have been on tech support for GoDaddy and with Adobe for many hours, with no solution, other than typing each document's name and linking each line to its related document, not feasible. I have to believe what I want to do must be possible and not very complex.
Copy link to clipboard
Copied
For web security reasons, directory contents should not be displayed by servers. GoDaddy is exercising best practice by making this forbidden.
As a workaround, create an index.php page in the Member's only folder.
The scandir() function in PHP is used to return an array of files and directories from a specified directory.
https://www.php.net/manual/en/function.scandir.php
Copy link to clipboard
Copied
This link has code examples with recommended use cases:
https://code-boxx.com/list-files-folders-php/
Copy link to clipboard
Copied
no solution, other than typing each document's name and linking each line to its related document, not feasible.
By @Mr Thackston
==========
To do this manually, drag & drop files from Files Panel into Design View. For best results, begin with a basic stucture like an unordered list.
Copy link to clipboard
Copied
As said @Nancy OShea , scandir() is a way to go for listing files.
However, I have two questions concerning your private access, and files downloading process :
Copy link to clipboard
Copied
Thanks, Nancy. These folders just contain sheet music PDFs and learning tracks for new music. Not a big deal. One folder might have 30 files, another 25 and members will probably only download a few at a time. This weekend I will try your suggestions. I really appreciate your help.
Copy link to clipboard
Copied
No problem, I understand your process modeling better. If you need it, I had to develop this kind of functionality for different applications. Adapting it would not be complicated.