nihaoligong 发表于 2013-4-22 22:52:01

菜鸟求助关于action的

<form name="form2" method="post" action="index.php/codeback/cooback" onSubmit="return chkinput(this)">
这个代码为什么总是找不到页面呀index需要配置吗

Hex 发表于 2013-4-23 10:59:08

action 用绝对URL,就是 http:// 开头的。

nihaoligong 发表于 2013-4-24 10:09:42

Hex 发表于 2013-4-23 10:59 static/image/common/back.gif
action 用绝对URL,就是 http:// 开头的。

我用了绝对地址也不行啊
$config['base_url']        = '';
我的另一个action跳转就可以
<form name="form1" method="post" action="/index.php/reg/adduser" onSubmit="return chkinput(this)">
但是上面那个还是不行呀 提示The URI you submitted has disallowed characters.

Hex 发表于 2013-4-24 11:22:20

nihaoligong 发表于 2013-4-24 10:09 static/image/common/back.gif
我用了绝对地址也不行啊
$config['base_url']        = '';
我的另一个action跳转就可以


这个提示不是找不到页面啊。。
你得说具体是什么错误提示。

这个提示是说你的 URL 里有非法字符,你把代码发上来吧。

nihaoligong 发表于 2013-4-24 16:55:29

<form name="form" method="post" action="/index.php/codeback/coback" onSubmit="return chkinput(this)">
$config['base_url']= '';
codeback的代码是class codeback extends CI_Controller {

function __construct()
    {
      parent::__construct();
                $this->load->database();
           $this->load->helper('url');
      }
    }
function index()
        {
                $this->load->view('codeback_view');
               
        }
function coback() {
                $this->load->model("save");
                $user=$this->save->user_select($_POST['usernc']);
                $aa=$_POST['usernc'];
                if($user)
                {
               
                        if($user->mbda==trim($_POST['mbda']))
                        {
                        echo"<script>alert('找回成功!');</script>";       
                        $this->load->view('enter');

提示错误为
404 Page Not Found
The page you requested was not found.

nihaoligong 发表于 2013-4-24 16:56:00

Hex 发表于 2013-4-24 11:22 static/image/common/back.gif
这个提示不是找不到页面啊。。
你得说具体是什么错误提示。



我把代码贴上了

nihaoligong 发表于 2013-4-24 16:56:54

我的另外一个代码就可以跳转<form name="form1" method="post" action="/index.php/reg/adduser" onSubmit="return chkinput(this)">

nihaoligong 发表于 2013-4-24 20:54:17

置顶 求大神告诉下:Q

Hex 发表于 2013-4-25 10:42:28

你这个很奇怪啊,竟然找不到控制器,你把控制器换个名字试试,也许是见鬼了,呵呵
页: [1]
查看完整版本: 菜鸟求助关于action的