$result = $this->db->insert('user_reg', $user_data);
if($result)
{
$userid = $this->db->insert_id();
$this->db->where('user_id', $userid);
$user_data = $this->db->get('user_reg')->row();
// $userid = $this->db->insert_id();
chmod('./upload/', 0777);
$path = './upload/'.$userid;
$binary=base64_decode($user_profile_img);
header('Content-Type: bitmap; charset=utf-8');
$img_path=$path.'/profile_image.jpg';
$file = fopen($img_path, 'wb');
fwrite($file, $binary);
$Gimage = mysql_real_escape_string(base_url($path.'/profile_image.jpg'));
fclose($file);
我收到错误说 fclose 正在使用二进制文件,谁能告诉我解决方案是什么,我无法理解 ci 更新功能。我需要在不更改其他内容的情况下更新表中的图像路径。