Iva*_*van 2 controller codeigniter
public function newreg()
{
$username = $this->input->post('username');
$password = $this->input->post('password');
$this->load->model('register_model');
$data['list']=$this->register_model->add($username, $password);
$this->load->view('register_display', $data);
}
Run Code Online (Sandbox Code Playgroud)
调用此函数后,这是一个名为register.php的控制器的一部分,我在屏幕上看到的只是空格.
此功能是工作控制器的工作副本的精确副本.仅更改文件名(模型,视图)
我无法弄清楚问题出在哪里.
你可以通过enalbing轻松检查enteire envoir中发生的事情CI logs,
去config/config.php编辑这个:
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| If you have enabled error logging, you can set an error threshold to
| determine what gets logged. Threshold options are:
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0; //put this to 4
Run Code Online (Sandbox Code Playgroud)
然后,如果您还没有/logs/ application文件夹中的文件夹,请创建该文件夹并添加775 chmod到该文件夹(仅限日志文件夹).
更新: 您还必须chown apache:apache logs让apache能够在该文件夹中写入.
通过浏览器运行您的应用程序并在/logs文件夹中检查log.php文件,它将包含all the application errors.
| 归档时间: |
|
| 查看次数: |
20594 次 |
| 最近记录: |