delete_files() not working correctly in CI3 |
This call is not working correctly. I'd like to delete uploads/richb2-gmail-com/ and all its subdirs. This my structure
uploads/richb2-gmail-com/thumbnails $szBucket_name = str_replace(array("@", "."), "-", $_SESSION['userid']); $ouputDirectory = '/app/assets/uploads/'.$szBucket_name.'/'; delete_files($ouputDirectory,TRUE); << $outputDirectory is /app/assets/uploads/richb201-gmail-com/ But when this runs it only deletes the following dir and it's files. It skips deleting /richb201-gmail-com /app/assets/uploads/richb201-gmail-com/thumbnails
proof that an old dog can learn new tricks
[quote pid="389060" dateline="1627916219"]
i use to for ci3 ,4 PHP Code: <?php namespace Modules\Common\Libraries; [/quote]
Enlightenment Is Freedom
Delete ALL Files and Subfolders from Folder in PHP
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thanks. I got that working now. My only problem is if the user exits the window by using X, my delete code doesn't run. Is there anyway to catch that a user is exiting via X ?
proof that an old dog can learn new tricks
How to capture the browser window close event?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |