Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeigniter-显示页面_Php_Codeigniter - Fatal编程技术网

Php Codeigniter-显示页面

Php Codeigniter-显示页面,php,codeigniter,Php,Codeigniter,在codeigniter中显示index.php时遇到问题。有人能帮我吗 以下是我的index.php: <form id="myForm" action="<?php echo baseurl('controller/CreateUser'); ?>" method="post"> Name: <input type="text" name="name"/><br/> Username: <input type="text"

在codeigniter中显示index.php时遇到问题。有人能帮我吗

以下是我的index.php:

<form id="myForm" action="<?php echo baseurl('controller/CreateUser'); ?>" method="post">
    Name: <input type="text" name="name"/><br/>
    Username: <input type="text" name="username"/><br/>
    Password: <input type="password" name="password"/><br/>
    <button id="sub">Save</button>
</form>
<span id="result"></span>

你能详细说明一下你遇到的问题吗?如果访问控制器URL会发生什么。另外,您使用的是哪种Web服务器,php版本。同时发布您的routeconfigit只需显示白色屏幕,先生,没有错误我的PHP版本是5.6.14是文件夹
application/views/NeverStopLearning
中的index.PHP文件吗?另外,如果您打开错误报告,会显示什么错误?或者您正在加载的内容实际上是空的,或者您没有报告错误。检查apache bin目录中的PHP.ini文件,并将其设置为E_ALL
public function index(){
    $this->load->view( 'layouts/header', [ 'title' => 'Never Stop Learning!' ] );
    $this->load->view( 'NeverStopLearning/index');
    $this->load->view( 'layouts/footer' );
}

public function CreateUser(){
    $data = array(
        "name" => $this->input->post("name"),
        "username" => $this->input->post("username"),
        "password" => $this->input->post("password")
    );

    if($this->model->Insert('table_users', $data)){
        echo "Successfully Inserted";
    }else{
        echo "Insertion Failed";
    }

}