Is it possible to link files in two different add-on domains' folders together?
I have a file stored in folder b which I want to access through the page in folder a. possible? I have been able to locate the file and the name has started to appear, but on downloading, it gives me 404. The file name is there, the file is there but on download, 404. Already checked file permissions and they are good.
<?php
$dir = "../b/files/"; //linking from a page in folder "a"
if (!file_exists($dir)) {
mkdir($dir, 0755);
} else {
// Open a directory, and read its contents
$files = scandir($dir, 0);
$count=1;
for($i = 2; $i < count($files); $i++)
echo $count++ .".<a href='".$dir.$files[$i]."'>". $files[$i] ."</a><br>";
}?>
It is as simple as:
<a href="../b/myfile_to_download_here">Download</a>
Take a look at https://www.w3schools.com/html/html_filepaths.asp, it will give you an insight to paths and relative paths