更新时间:2023-02-24 08:13:35
您需要首先加载数据库。 Codeiginiter将不会默认为您加载。
You need to load the database first. Codeiginiter won't load it by default for you.
您可以将其添加到 /config/autoload.php
like like
You can either add it to /config/autoload.php
like so
$autoload['libraries'] = array('database');
或者您可以通过调用
$this->load->database();
更多详情