| #1059 | $host_file = trim(preg_replace('/_+/', '_', $host_file), '_-'); |
| #1060 | if($host_file === '') $host_file = 'favicon'; |
| #1061 | $filepath = $dir.$host_file.'_'.date('His').'_'.uniqid().'.'.$ext; |
| #1062 | $path = $updir.$filepath; |
| #1063 | if(file_put_contents(ROOT_PATH.$path, $body) === FALSE) return array('err'=>1, 'msg'=>'本地图标保存失败!'); |
| #1064 | $aid = !empty($extra['save_attach']) ? $this->favicon_record_attach($path, $setting, $extra) : 0; |
| #1065 | if(!empty($extra['save_attach']) && !$aid) { |
| #1066 | @unlink(ROOT_PATH.$path); |
| #1067 | return array('err'=>1, 'msg'=>'本地图标附件记录保存失败!'); |
| #1068 | } |