onice 发表于 2011-5-16 11:10:25

关于form action的问题,在线急等!!

本帖最后由 onice 于 2011-5-16 11:27 编辑

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


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

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


$config['base_url']      = "http://127.0.0.1/onice/";


$config['index_page'] = "";


.htaccess

RewriteEngine on
RewriteBase /onice
RewriteCond $1 !^(index\.php|images|robots|template|cart)
RewriteRule ^(.*)$ /onice/index.php/$1
#RewriteRule ^(.*)$ index.php/$1


页面title:

<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程序的问题~我晕死

jeongee 发表于 2011-5-16 11:24:40

回复 onice 的帖子

别重复发帖啊!
你不用这个cart的页面,其他的页面rewrite表现都正常不?

onice 发表于 2011-5-16 11:27:44

回复 jeongee 的帖子

对不起,对不起,我是被着急冲昏了头脑,现在已经解决了,谢谢
页: [1]
查看完整版本: 关于form action的问题,在线急等!!