Lightbox 在本地可以工作,但上传到服务器后就不行

发布于 2024-11-09 03:05:38 字数 258 浏览 2 评论 0 原文

我有问题。我正在使用 jquery.lightbox-0.5 来显示图像,并且在我的本地计算机上一切正常。但是,一旦我上传到我的服务器,它就不起作用了。

有人遇到过这个吗?

据我所知,这不是大小写问题。

如果有人能够看一下,我将不胜感激!

该网站是:http://greendeco.ca/gallery.html

I'm having a problem. I'm using jquery.lightbox-0.5 to display images and everything works fine on my local machine. However, as soon as I upload to my server it doesn't work.

Anyone come across this?

As far as I can tell it's not a capitalisation issue.

I'd be grateful if someone would be able to have a look!

The site is: http://greendeco.ca/gallery.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

森罗 2024-11-16 03:05:38

总是尝试使用firebug优秀的工具,它可以正确地告诉你错误。

如果您不使用,请开始使用。

您收到以下错误

$ is not defined
[Break On This Error] $(function() { 

,这意味着 jquery 未正确包含,

这是我尝试在您的页面上访问 jquery 时出现的错误

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /jquery-lightbox-0.5/js/jquery.js
on this server.</p>
<hr>
<address>Apache/2.0.54 Server at greendeco.ca Port 80</address>
</body></html>

always try to use firebug excellent tool which can tell you the error right way.

if you are not using , please start using it.

You are getting the following error

$ is not defined
[Break On This Error] $(function() { 

that means jquery is not included properly ,

this is the error when i try to acess jquery on your page

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /jquery-lightbox-0.5/js/jquery.js
on this server.</p>
<hr>
<address>Apache/2.0.54 Server at greendeco.ca Port 80</address>
</body></html>
夏见 2024-11-16 03:05:38

这是文件权限问题,请确保apache用户可以读取该文件(通常是www-data)

It's a file permission issue, make sure the file is readable by the apache user (usually www-data)

江挽川 2024-11-16 03:05:38

尝试访问 jquery-lightbox-0.5 文件夹 中的文件时:

view-source:http ://greendeco.ca/gallery.html

Forbidden

You don't have permission to access /jquery-lightbox-0.5/js/jquery.js 
on this server.

Apache/2.0.54 Server at greendeco.ca Port 80

这会导致

Uncaught ReferenceError: $ is not defined

修复该文件夹的服务器权限

,例如:

<Directory "/home/domain/www/jquery-lightbox-0.5">
            Order allow,deny
        Allow from all
</Directory>

这里有更多内容
并重新启动你的服务器

when trying to access the files in the jquery-lightbox-0.5 folder :

view-source:http://greendeco.ca/gallery.html

Forbidden

You don't have permission to access /jquery-lightbox-0.5/js/jquery.js 
on this server.

Apache/2.0.54 Server at greendeco.ca Port 80

which results in a

Uncaught ReferenceError: $ is not defined

fix your server permissions on that folder

something like:

<Directory "/home/domain/www/jquery-lightbox-0.5">
            Order allow,deny
        Allow from all
</Directory>

more here
and restart your server

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文