ci_xiaoniu 发表于 2011-3-31 15:41:04

去掉 index.php 后 提交表单到 controllers 中 失败?

<?php
                echo form_open('cuser/save');
        ?>       
        <input type="text" name="name" id="name" size="20" style="margin-top:10px;"/><br />
        <input type="text" name="age"id="age"size="20" style="margin-top:10px;"/><br />
        <input type="text" name="sex"id="sex"size="20" style="margin-top:10px;"/><br />
        <?php       
                echo form_submit('submit','submit');
                echo form_close();
        ?>

提示找不到save ?希望指点!

lijun14992560 发表于 2011-3-31 15:48:26

echo form_open(site_url('cuser/save'));

记得导入url help

ci_xiaoniu 发表于 2011-3-31 17:43:39

还是不行 你们去掉 index.php 的正则 怎么写的? 放在什么位置?

Hex 发表于 2011-4-1 14:42:03

去掉 index.php 需要写 url rewrite,请看FAQ置顶帖。

ci_xiaoniu 发表于 2011-4-1 16:19:03

谢谢 已解决!
页: [1]
查看完整版本: 去掉 index.php 后 提交表单到 controllers 中 失败?