I have tried pretty much everything to delete a directory that has other files and dirs in (only about 3 levels) but can get nothing to work.

I need to be able to delete the directory and the entire contents of it in PHP.

Any ideas?

I've tried most of the functions and ideas found on here and the php.net doc site

    • [deleted]

    Sometimes the simplest solutions are the best.
    on unix, try 'exec ("rm -rf directory_name")'
    on windows look for a tiny program called deltree.

      Cheers m8

      You are a star.

      I think I actually tried that as well but probably in the confusion of going between Win and LINUX I got confused.

      Works a treat.

        Write a Reply...