dongtuo8170 2018-07-13 08:46
浏览 70

相对包含的脚本,但它显示Not Found错误

I have a smarty-test01 smarty project.

In my templates/index2.tpl:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>dialog</title>
    <!--jquery-->
    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="../libs/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.min.js"></script> // you see there I import the jquery-ui.
    <!--Css-->
    <link rel="stylesheet" href="../libs/jquery-ui-1.9.2.custom/css/base/jquery-ui-1.9.2.custom.min.css" />
    <script language="javascript" type="text/javascript">
    ...

I imported the jquery-ui and jquery-ui-css.

but when I access the http://localhost:63342/smarty-test01/index2.php, the browser says Not found the jquery-ui and its stylesheet. I am sure the relative path is correct.

enter image description here


The directories tree:

.
├── CONSTANTS.php
├── cache
├── configs
│   └── constants.php
├── htdocs
│   ├── index.php
│   └── index2.php
├── index.php
├── index2.php
├── libs
│   └── jquery-ui-1.9.2.custom
│       ├── css
│       │   └── base
...
│       │   └── ui.widget.jquery.json
│       ├── index.html
│       └── js
│           ├── jquery-1.8.3.js
│           ├── jquery-ui-1.9.2.custom.js
│           └── jquery-ui-1.9.2.custom.min.js
├── smarty.php
├── templates
│   ├── index.tpl
│   └── index2.tpl
└── templates_c
    ├── 8b747b0f978b4e5206c429d91816c400edfe7ec5_0.file.index2.tpl.php
    ├── 976090f2d104294efca669338810dea6bf8e1484_2.file.debug.tpl.php
    └── aac75150379166297487ae8ee5a1de73ee3e89c7_0.file.index.tpl.php

EDIT-1

Because in the phpStorm, the editor do not shows that's a wrong path, so this is strange. I also tried the absolute path.

  • 写回答

1条回答 默认 最新

  • dton37910 2018-07-13 09:36
    关注

    Do you have any default CSS file in the directory? If so, then remove or rename it and see if you get the expected result.

    Or alternatively you can try this:

    /../libs/jquery-ui-1.9.2.custom/css/base/jquery-ui-1.9.2.custom.min.css"
    
    评论

报告相同问题?

悬赏问题

  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名