Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exec not working #2

Open
seansan opened this issue Mar 4, 2013 · 1 comment
Open

Exec not working #2

seansan opened this issue Mar 4, 2013 · 1 comment

Comments

@seansan
Copy link

seansan commented Mar 4, 2013

Is it possible to add a version that tests if exec is enabled

If not that it uses something like this:

function cleandir($dir) {

if ($handle = opendir($dir)) {
    while (false !== ($file = readdir($handle))) {
        if ($file != '.' && $file != '..' && is_file($dir.'/'.$file)) {
            if (unlink($dir.'/'.$file)) { }
            else { echo $dir . '/' . $file . ' (file) NOT deleted!<br />'; }
        }
        else if ($file != '.' && $file != '..' && is_dir($dir.'/'.$file)) {
            cleandir($dir.'/'.$file);
            if (rmdir($dir.'/'.$file)) { }
            else { echo $dir . '/' . $file . ' (directory) NOT deleted!<br />'; }
        }
    }
    closedir($handle);
}

}

@tosbourn
Copy link
Owner

tosbourn commented Mar 6, 2013

This makes a lot of sense - If you create a pull request I can merge this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants