我需要保护名为" files"。的目录中的所有文件
目录结构如下:
- root web-app
- / js /
- / img /
- / files /
- index.php
当我试图获得时,访问权将被拒绝
http://root web-app / files / xyz.pdf
另一方面,我需要通过这样的javascript访问:
var myObject = document.createElement("object");
var myObjectAtt = document.createAttribute("data");
myObjectAtt.nodeValue = pdfFileDataObject.file;
myObject.setAttributeNode(myObjectAtt);
var myObjectType = document.createAttribute("type");
myObjectType.nodeValue = "application/pdf";
myObject.setAttributeNode(myObjectType);
myObject.style.width = "480px";
myObject.style.height = "640px";