我对 Codeigniter 真的很陌生,只是从头开始学习。在 CI 文档中它说:
$params = array('type' => 'large', 'color' => 'red');
$this->load->library('Someclass', $params);
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Someclass {
public function __construct($params)
{
// Do something with $params
}
}
你能给我一个简单的例子,如何使用数组作为参数将数据从控制器传递到外部库吗?我想看一个简单的例子。