Apparently, I am confused how to use site_url
() while deleting a file.
My site_url responded with http://localhost/Project/index.php
For deleting a file, I use unlink
command. However, How to use site_url
into the unlink
command in codeigniter
. I am surprised!
Below is the path where the uploaded files get stored!
$config['upload_path'] = './assets/images';
I have used the following:
unlink($_SERVER['DOCUMENT_ROOT']."/NetSach/assets/images/".$_FILES['picture']['name']);
Message: unlink(C:/xampp/htdocs/NetSach/assets/images/sweepers cartoon.jpg): No such file or directory