除胶剂成分
$str2 = substr($str1,0,$k);//删除胶剂成分以后的字符串
$str3 = str_replace('(','',$str2);//删除前面多余的括号
$str4 = str_replace(')','',$str3);//删除后面多余的括号
$strfinal = str_replace('(','',$str4);//删除前面多余的中文括号
$arr_honey_ingredient = preg_split('/,|,/',$strfinal);//用逗号分割成数组
foreach($arr_honey_ingredient as $val){
if(strpos($val,'水') !== false){//如果有“水”,说明有水分,不抓取
$val = '';
}
$arr_ingredient[] = $val;
}
$arr_ingredient = array_filter($arr_ingredient);//去除空值
$arr_ingredient = array_unique($arr_ingredient);//去重复
$str_ingredient = implode(',',$arr_ingredient);//转为字符串
$val['ingredient'] = $str_ingredient;
if(strpos($val['content'],'/')){//如果有斜杠,表示还有其他成分
$arr_other_ingredient = array();
$arr = explode('/',$val['content']);//用斜杠分割成数组
foreach($arr as $v){
$v = trim($v);
if(strpos($v,'水') !== false){//如果有“水”,说明有水分,不抓取
$v = '';
}
if($val['honey_type'] != '燕窝'){
if(strpos($v,$val['honey_type']) !== false){//如果有子串,不抓取
$v = '';
}
}
$arr_other_ingredient[] = $v;
}
$arr_other_ingredient = array_filter($arr_other_ingredient);//去除空值
$arr_other_ingredient = array_unique($arr_other_ingredient);//去重复
$str_other_ingredient = implode(',',$arr_other_ingredient);//转为字符串
$val['other_ingredient'] = $str_other_ingredient;
}else{
$val['other_ingredient'] = '';
}
$val['producer'] = $val['producer'] ? $val['producer'] : '未知';
$val['production_date'] = $val['production_date'] ? $val['production_date'] : '未知';
$val['shelf_life'] = $val['shelf_life'] ? $val['shelf_life'] : '未知';
$val['net_weight'] = $val['net_weight'] ? $val['net_weight'] : '未知';
$val['in_date'] = date('Y-m-d H:i:s');
$val['barcode'] = $val['barcode'] ? $val['barcode'] : '未知';
$val['format'] = $val['format'] ? $val['format'] : '未知';
$val['standard_no'] = $val['standard_no'] ? $val['standard_no'] : '未知';
$arr_honey[] = $val;
if(count($arr_honey) >= 5){
break;
}
//echo '
';//print_r($val);
}
//echo '
';//print_r($arr_honey);
//$data = $honey_model->addAll($arr_honey);
//$data = '该页面正在维护中...';
echo json_encode($arr_honey,JSON_UNESCAPED_UNICODE);//json格式输出中文
}else{
$data = $honey_model->where($where)->limit(5)->select();
echo json_encode($data,JSON_UNESCAPED_UNICODE);//json格式输出中文
}
}
public function get_instruction(){
$barcode = $_GET['barcode'];
$honey_model = M('honey');
$where = array('barcode'=>$barcode);
$data = $honey_model->where($where)->getField('instruction');
echo $data;
}
}
?>
除胶剂成分 危害
由于胶剂的构成成分不同,其危害也不尽相同,但是大多数胶剂都含有有害物质,例如:
1. 氯乙烯:这种化学物质可引起肺部疾病,如肺炎、支气管炎等,而且还会引起眼、鼻等器官损伤。
2. 甲醛:这种物质会导致肝脏毒性,引起皮肤痒、发红、脱皮、角质层脱落等反应。
3. 亚硝酸盐:它可能会引起中毒,诱发肝脏病、肾脏病、癌症等疾病。
4. 含铅:这是一种毒性物质,有毒物质进入人体会导致神经系统疾病、肝脏疾病、血液系统疾病等。
因此,应尽量避免使用含有有害物质的胶剂,以防止可能出现的危害。
总结:除胶剂成分的介绍到此就结束了,感谢您的支持。你可能想看: