Php 未定义的属性:Posts::$Posts\u model并调用null上的成员函数create\u post()

Php 未定义的属性:Posts::$Posts\u model并调用null上的成员函数create\u post(),php,codeigniter,Php,Codeigniter,插入post时出现两个错误 我在数据库中还有一个posted_date current timestamp和id auto increment列。我需要吗 将这些添加到表单中 我的模式 id int11无自动增量 邮政标题varchar128No 由varchar128No发布 发布日期时间戳更新当前时间戳时无当前时间戳 post_描述文本编号 slug varchar128号 遇到一个PHP错误 严重性:通知 消息:未定义属性:Posts::$Posts\u model 文件名:control

插入post时出现两个错误 我在数据库中还有一个posted_date current timestamp和id auto increment列。我需要吗 将这些添加到表单中

我的模式 id int11无自动增量 邮政标题varchar128No 由varchar128No发布 发布日期时间戳更新当前时间戳时无当前时间戳 post_描述文本编号 slug varchar128号

遇到一个PHP错误

严重性:通知

消息:未定义属性:Posts::$Posts\u model

文件名:controllers/Posts.php

行号:54

回溯:

文件:C:\xampp\htdocs\myblog\application\controllers\Posts.php 电话号码:54 函数:\u错误\u处理程序

文件:C:\xampp\htdocs\myblog\index.php 电话号码:315 功能:需要一次 遇到未捕获的异常

类型:错误

消息:调用成员函数create_post on null

文件名:C:\xampp\htdocs\myblog\application\controllers\Posts.php

行号:54

回溯:

文件:C:\xampp\htdocs\myblog\index.php 电话号码:315 功能:需要一次

Post_model.php

` Post.php

` Create.php `

`这一行

        $this->posts_model->create_post();
需要更正并更改为

        $this->post_model->create_post();
<label for="post_title">Title</label>
<input type="text" name="post_title" /><br />

<label for="posted_by">Posted By</label>
<input type="text" name="posted_by" /><br />

<label for="post_description">Description</label>
<textarea name="post_description"></textarea><br />

<label for="slug">Slug</label>
<input type="text" name="slug" /><br />

<input type="submit" name="submit" value="Create Blog item" />
        $this->posts_model->create_post();
        $this->post_model->create_post();