0

所以我让 jFeed 在另一个站点上工作,我现在正在使用插件的最基本实例对其进行测试,但它仍然表现得很奇怪,并给我一个 403 禁止错误。

我从萤火虫的回应...

<h1>Forbidden</h1>
<p>You don't have permission to access /proxy.php
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at m.dudnyk.com Port 80</address>
</body></html>

这是代码...

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
<script src = "src/jquery.jfeed.pack.js"></script>

<script>
jQuery(function() {

    jQuery.getFeed({
        url: 'proxy.php',
        data: {url:'http://feeds.nytimes.com/nyt/rss/Technology'},

        success: function(feed) {

            jQuery('#result').append('<h2>'
            + '<a href="'
            + feed.link
            + '">'
            + feed.title
            + '</a>'
            + '</h2>');

            var html = '';

            for(var i = 0; i < feed.items.length && i < 5; i++) {

                var item = feed.items[i];

                html += '<h3>'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</h3>';

                html += '<div class="updated">'
                + item.updated
                + '</div>';

                html += '<div>'
                + item.description
                + '</div>';
            }

            jQuery('#result').append(html);
        }    
    });
});

$(document).ready(function(e) {


});
</script>
</head>

<body>
<div id = "result">
</div>
</body>
4

1 回答 1

0

毕竟这是主机的权限问题。始终与他们核对!

于 2011-10-18T14:22:52.980 回答