91919/how-do-i-remove-a-directory-that-is-not-empty
Hello,
Try this code:
function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != '.' && $object != '..') { if (filetype($dir.'/'.$object) == 'dir') {rrmdir($dir.'/'.$object);} else {unlink($dir.'/'.$object);} } } reset($objects); rmdir($dir); } }
Hope it helps!!
Hello @kartik, The checked property of a checkbox DOM element ...READ MORE
Hello @kartik, The proper way would be to ...READ MORE
Hii, I would use isset and empty: session_start(); if(isset($_SESSION['blah']) && !empty($_SESSION['blah'])) { ...READ MORE
Hello @kartik, Try this: str_replace('"', "", $string); str_replace("'", "", $string); Otherwise, ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello @kartik, It seems that you need scandir instead of ...READ MORE
Hello @kartik, The user-contributed section in the manual ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.