admin管理员组文章数量:1122846
I have my site structure as follows:
mysite.co.uk/admin/file.php
my images are stored:
mysite.co.uk/files/images/product/
The problem I am facing is the the code on the
mysite.co.uk/admin/file.php will not let me read the images in the products folder:
My code is as follows:
$dir = "../files/images/product/";
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
foreach ($files as $filename){
echo "<option value='". $filename . "'>" . $filename . "</option>";
}
Please any advise is welcome
I can see the files stored in ../files/images/ when changing the $dir to ../files/images/product the server send a HTTP502 error, which seems a bad gateway.
I have tried to allow url files/images/product in the firewall however that doesnt work either.
I have also tried to change the permission on the actual folder 0755 to 0644 but that caused a lot more problems
The server is godaddy.
Please any advise is welcome
本文标签: phpAccess denied from subfolder to root sub folderStack Overflow
版权声明:本文标题:php - Access denied from subfolder to root sub folder - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736299630a1930525.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论