Php Codeigniter-显示页面
在codeigniter中显示index.php时遇到问题。有人能帮我吗 以下是我的index.php: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"
<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";
}
}