ci 框架 index.php以及 js css 路径问题
来源:互联网 发布:获取网站整站源码工具 编辑:程序博客网 时间:2024/06/18 09:00
问题: 登录页面的form表单无法提交,显示路径not found。 想到用, 在action 路径中加入index.php后 可以跳转。可是并没有根本解决问题,在引入css,js文件时,全路径不对,发现所有路径都加了index.php,无法显示。
解决:新建.htaccess 文件,注意.htaccess 文件路径,里面写上:
RewriteEngine on
RewriteCond $1 !^(index\.php|upload|public|apidoc|new_admin)
RewriteRule ^(.*)$ /365tang/index.php/$1 [L]
问题:css js路径 是全路径,这样本地、服务器同步困难。
解决:页面头部 加:
<head>
<base href="<?=base_url();?>" />
</head>
控制页面 构造函数:
function __construct()
{
$this->load->helper('url');
}
0 0
- ci 框架 index.php以及 js css 路径问题
- CI框架去掉index.php以及解决No input file specified问题
- 隐藏CI框架路径中的index.php方法
- 更改CI框架默认访问路径及去掉index.php
- CI去除index.php和引入文件的路径问题
- CI框架去除index.php
- ci框架&tp框架隐藏index.php
- php ci框架中加载css和js文件失败
- CI 引入JS,CSS,图片的路径问题
- 去掉 CI 框架中的 index.php
- CI框架路由去掉index.php
- CI框架去除index.php(Nginx)
- 去掉php框架CI默认url中的index.php
- 去掉php框架CI默认url中的index.php
- PHP CodeIgniter(CI)框架中去掉 index.php方法
- php新手----Coderigniter/CI框架去除index.php
- PHP CI框架学习之路径访问
- CI去掉index.php
- Android Studio阅读android 源码
- 举着伞真是累
- AVInputFormat结构体源码介绍
- Redis操作命令总结
- 关于EL中属性不匹配Property 'Name' not found on type
- ci 框架 index.php以及 js css 路径问题
- 简单的实现迷宫问题
- oracle中的检查点Ckpt和SCN号
- Linux应用层直接操作GPIO
- 常用vi命令总结
- 图的最短路径 Ford算法 解决负权问题
- iphone4s怎么恢复备忘录
- jeecms网站开发出现会员登录页面
- iOS7下隐藏statusbar