You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
746 B
PHTML
38 lines
746 B
PHTML
1 year ago
|
<?php
|
||
|
if (!defined('BASEPATH'))
|
||
|
exit('No direct script access allowed');
|
||
|
|
||
|
class infofix extends CI_Controller
|
||
|
{
|
||
|
var $site_code = '';
|
||
|
|
||
|
function __construct()
|
||
|
{
|
||
|
parent::__construct();
|
||
|
$this->load->model('Information_model');
|
||
|
$this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code');
|
||
|
}
|
||
|
|
||
|
function list_info_by_keys($site = '', $keys = [])
|
||
|
{
|
||
|
$site = 'cht';
|
||
|
$keys = ['test', 'china-hi'];
|
||
|
|
||
|
// 容错
|
||
|
if (empty($site) || empty($keys)) {
|
||
|
echo json_encode(
|
||
|
array(
|
||
|
'data' => []
|
||
|
)
|
||
|
);
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
echo json_encode($this->Information_model->list_by_keywords($site, $keys));
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
//end of infofix
|