我是一直得到403 Forbidden错误,我不能够让我的JSON数据在所有...这是我的HTML源代码:为什么我一直得到403禁止的问题?
<html>
<head>
<meta name="keywords" content="jquery,ui,easy,easyui,web">
<meta name="description" content="easyui help you build your web page easily!">
<title>jQuery EasyUI Demo</title>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
</head>
<body>
<h1>TreeGrid</h1>
<script>
(function(){
$.getJSON("data/data.json", function(data){
console.log(data); // i am not getting data here
});
})();
</script>
</body>
</html>
的URL路径是正确的。我得到的错误为:
GET http://localhost/~xxxxxx/dataTest/data/data.json 403 (Forbidden)
我该如何解决这个问题?
当您尝试直接访问http://localhost/~xxxxxx/dataTest/data/data.json时会发生什么? – Osiris
对不起,我越来越喜欢这样:Forbidden 您无权访问此服务器上的/~xxxxx/dataTest/data/data.json。 Apache/2.2.24(Unix)DAV/2 PHP/5.3.26与本地主机端口80 Suhosin-Patch服务器 – 3gwebtrain