我该如何解决这个错误? 字符串逃脱

I got this error:

Fatal error: Uncaught Error: Call to undefined function mysqli_real_escape_string()

this is the way i declare:

$imageName=mysqli_real_escape_string($_FILES['image']['name']);
$tmp_name=mysqli_real_escape_string($_FILES['image']['tmp_name']);

I tried to find its extension on php.ini config, and I think it is already included, why is it? Because when I don't use escape string, I cant properly upload the image. Thank you in advance for anyone who helping me.

There is no need to write mysqli_real_escape_string for images.

You can use mysqli_real_escape_string to Escapes special characters entered by user in a string (text type) format which is further used to save in SQL statement.

For image you can use various FILES function like. is_uploaded_file and getimagesize