How to remove Base URL Duplication?

I just examined your URL http://www.homecredit.ph/wp-content/uploads/home1/homecre1/public_html/files/News-26.jpg and code and noticed that, you are saving your image in http://www.homecredit.ph/files/News-26.jpg path but trying to access from upload directory of WordPress. /home1/homecre1/public_html/files/News-26.jpg – this is the path stored in database for your attachment ID. /home1/homecre1/public_html/ – This is your root directory where WordPress installed. So better save only the file name in db or remove the root path from the database value and attach with site url. EG:

$filePath = str_replace('/home1/homecre1/public_html', '', $record_s->attachment_resume_id);
echo '<td id="resumeFile'.$optionId.'"><a href="https://wordpress.stackexchange.com/questions/227257/. $filePath .">Download Resume</a></td>';

It’s just an example. You should not hard code the path in str_replace function. You need to use PHP function to get the root path and place it in the function. First try with the above code. If it works then proceed with the above step.