POST 变量使用编码器点火器生成一般错误


POST vars generate general error with codeigniter

当我尝试使用 post 方法通过表单传递 vars 时,它会生成以下代码点火器错误"GENERAL_ERROR"。

这里有一个非常简单的例子给你

控制器/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>

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