路径不适用于动手JS和CSS

时间:2014-12-31 14:34:53

标签: javascript html css codeigniter handsontable

enter image description here

这可能是非常容易的事情,但我很难过,无法让我的codeigniter项目中的路径工作。我正在尝试安装最新的handontable(.12.2)。按照说明(https://github.com/handsontable/handsontable/tree/master/dist),我在页面的头部有以下html:

<html> 
  <head> 
      <base href="<?=base_url();?>">


      <!-- jQuery -->
<script type="text/javascript" charset="utf8" src="http://code.jquery.com/jquery-1.9.0.js"></script>      

<script src="handsontable/dist/handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="handsontable/dist/handsontable.full.css">

文件结构位于屏幕截图中。

当我尝试加载页面时,我在控制台中看到以下内容:

"NetworkError: 404 Not Found - http://localhost/b1/handsontable/dist/handsontable.full.css"
"NetworkError: 404 Not Found - http://localhost/b1/handsontable/dist/handsontable.full.js"
"NetworkError: 404 Not Found - http://localhost/b1/handsontable/dist/handsontable.full.css"

我做错了什么?

1 个答案:

答案 0 :(得分:1)

我想在<base href="<?=base_url();?>">你应该做<base href="<?php echo base_url();?>">。这应该有用。