Rabu, 27 November 2013

Deleting a File using php/codeigniter


you can use the "file helper" in codeigniter.
http://codeigniter.com/user_guide/helpers/file_helper.html
and like this :
$this->load->helper("file");
delete_files($path);
Late Edit: delete_filesmethod uses a path to wipe out all of its contents via unlink() and same you can do within CI. Like this:
unlink($path); 
a valid path.

example :
$path_file = './riskv2-assets/captcha/';
delete_files($path_file);

Tidak ada komentar:

Posting Komentar