无法在蛋糕 php 中链接 javascript (defalut.ctp)
我的 default.ctp (projects/customer/lib/Cake/View/Layouts/default.ctp) 的 head 标记中有以下代码:
<script type="text/javascript" src="/home/developer/workarea/projects/customer/app/webroot/js/jquery.autoSuggest.packed.js"></script>
但浏览器无法使用 js 文件:单击查看源中的链接查看js文件会产生以下错误:
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /home/developer/workarea/projects/customer/app/webroot/js/jquery.autoSuggest.packed.js was not found on this server.</p>
<hr>
<address>Apache/2.2.14 (Ubuntu) Server at localhost Port 80</address>
</body></html>
但是可以通过在浏览器中直接输入其url来访问js文件。
I have the following code in my default.ctp (projects/customer/lib/Cake/View/Layouts/default.ctp), in the head tag:
<script type="text/javascript" src="/home/developer/workarea/projects/customer/app/webroot/js/jquery.autoSuggest.packed.js"></script>
But the js file not available to the browser: clicking on the link in view source to view the js file produces the following error:
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /home/developer/workarea/projects/customer/app/webroot/js/jquery.autoSuggest.packed.js was not found on this server.</p>
<hr>
<address>Apache/2.2.14 (Ubuntu) Server at localhost Port 80</address>
</body></html>
But the js file is accessible by directly entering its url in the browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么你不尝试:
why you don'try :