【发布时间】:2015-12-09 23:39:59
【问题描述】:
我正在测试一些没有使用数据库的表的基本搜索。
问题是搜索在 HTML 文件中工作,但未能在 php 文件上工作(我使用的是 codeigniter 框架)。
这是两个 html 文件上的代码:
<script src="js/search.js"></script>
这是我的 CI php VIEW 文件中的代码:
script type="text/javascript" src="application/views/ui/js/search.js">
我在视图上的 htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /webs/BCI/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
我的 base_url 函数适用于我的 css 文件,但它不会加载位于我的 js 文件夹中的我的 JS 文件。 加载js文件还需要什么配置吗?
【问题讨论】:
标签: javascript php html .htaccess codeigniter