|
|
|
@ -192,6 +192,48 @@ class Welcome extends CI_Controller {
|
|
|
|
|
->set_content_type('application/json')
|
|
|
|
|
->set_output(json_encode($obj));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//批量替换二级域名,如图片或者data域名
|
|
|
|
|
function replace_hostname($topnum){
|
|
|
|
|
$data=array();
|
|
|
|
|
$find_host='http://bilder.chinarundreisen.com/';
|
|
|
|
|
$new_host='//bilder.chinarundreisen.com/';
|
|
|
|
|
$data['all_information'] = $this->Information_model->search_all_text($find_host,$topnum);
|
|
|
|
|
if($data['all_information']){
|
|
|
|
|
foreach($data['all_information'] as $item){
|
|
|
|
|
echo $item->ic_url.'<br/>';
|
|
|
|
|
$item->ic_content=str_replace($find_host, $new_host,$item->ic_content);
|
|
|
|
|
$this->InfoContents_model->Update(
|
|
|
|
|
$item->ic_id,
|
|
|
|
|
$item->ic_url,
|
|
|
|
|
$item->ic_url_title,
|
|
|
|
|
$item->ic_type,
|
|
|
|
|
$item->ic_title,
|
|
|
|
|
$item->ic_content,
|
|
|
|
|
$item->ic_summary,
|
|
|
|
|
$item->ic_seo_title,
|
|
|
|
|
$item->ic_seo_description,
|
|
|
|
|
$item->ic_seo_keywords,
|
|
|
|
|
$item->ic_show_bread_crumbs,
|
|
|
|
|
$item->ic_status,
|
|
|
|
|
$item->ic_template,
|
|
|
|
|
$item->ic_photo,
|
|
|
|
|
$item->ic_photo_width,
|
|
|
|
|
$item->ic_photo_height,
|
|
|
|
|
$item->ic_recommend_tours,
|
|
|
|
|
$item->ic_recommend_packages,
|
|
|
|
|
$item->ic_ht_area_id,
|
|
|
|
|
$item->ic_ht_area_type,
|
|
|
|
|
$item->ic_ht_product_id,
|
|
|
|
|
$item->ic_ht_product_type,
|
|
|
|
|
$item->ic_author
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
echo 'all done';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function check_url($subject) {
|
|
|
|
|
$result = $subject;
|
|
|
|
|