用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2292|回复: 2
收起左侧

[已解决] 关于form action的问题,在线急等!!

[复制链接]
发表于 2011-5-16 11:10:25 | 显示全部楼层 |阅读模式
本帖最后由 onice 于 2011-5-16 11:27 编辑

因为系统是要交给别人继续整合,只能用别人给的购物车类。


所以不能用CI自己的购物车,
我把购物车类放在网站根目录,
D:\AppServ\www\onice\cart

然后form里面的action设置为
PHP复制代码
action="<?php echo base_url()?>cart/index.php?action=add"
复制代码

config.php

PHP复制代码
 
$config['base_url']        = "http://127.0.0.1/onice/";
 
 
$config['index_page'] = "";
 
复制代码

  1. .htaccess

  2. RewriteEngine on
  3. RewriteBase /onice
  4. RewriteCond $1 !^(index\.php|images|robots|template|cart)
  5. RewriteRule ^(.*)$ /onice/index.php/$1 [L]
  6. #RewriteRule ^(.*)$ index.php/$1 [L]

复制代码

页面title:

HTML复制代码
<base href="<?php echo base_url()?>templates/default/" />
复制代码

提交的时候,url就会跳转到127.0.0.1/cart
这样就提交失败了,
正确的提交地址应该是:
127.0.0.1/onice/cart/index.php?action=add


=========已经解决==============
原来是cart程序的问题~我晕死
发表于 2011-5-16 11:24:40 | 显示全部楼层
回复 onice 的帖子

别重复发帖啊!
你不用这个cart的页面,其他的页面rewrite表现都正常不?
 楼主| 发表于 2011-5-16 11:27:44 | 显示全部楼层
回复 jeongee 的帖子

对不起,对不起,我是被着急冲昏了头脑,现在已经解决了,谢谢

本版积分规则