0

当我尝试使用 post 方法通过表单传递变量时,它会生成以下 codeigniter 错误“GENERAL_ERROR”。

4

1 回答 1

0

这是一个非常简单的例子

控制器/test_form.php

<?php
class Test_form extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        if ($this->input->post())
        {
            print_r($this->input->post());
        }

        $this->load->view('test_form');
    }
}

意见/test_form.php

<form action="test_form" method="post">
    <input type="text" name="test_field_one" />
    <button type="submit">Go!</button>
</form>

也许您在代码中的某个地方有错字,尽管我在黑暗中刺伤了东西,但没有看到它。

于 2012-04-13T10:15:34.417 回答