When I upload the image file into the database and upload the image in a project directory this time I have faced some problem. Upload image name of the database and project directory name is shown different. It showed me when I upload image name was some white space. So, I want to remove the whitespace from the image when uploading the image in php.
I need help. How can I do it?
Hello, Sohil Shah.
Thanks for ask question here.
You want to remove white-space from the image when uploading data into the MySQL using PHP. Follow this code.
$image = str_replace(' ', '_', $filename);
I hope this code will be helpful for you. If you have any question related programming, ask here. We are trying to solve your problem very quickly.
Question and answer is powered by AnsPress.io