divinedesigns1 Posted August 2, 2012 Share Posted August 2, 2012 hello, can someone explain to me how to use rmdir(), because i read the php.net section but i still do not get it, im trying to remove a folder when a album is deleted from the site, but im not sure how to do this, i tried rmdir('pushup/' . mysqli_insert_id($boo), 0777);rmdir('pushup/thumbs/' . mysqli_insert_id($boo), 0777); but this just give me an error Warning: rmdir() expects parameter 2 to be resource, integer given in C:\wamp\www\Newshyt\delete_album.php on line 33 i put the database connection string n the file permission what do i actually need to put to make this work correctly? Link to comment Share on other sites More sharing options...
boen_robot Posted August 2, 2012 Share Posted August 2, 2012 As you can see in rmdir()'s manual page, the optional second argument is a context resource.A context provides additional data that may be needed to access the file/folder you're about to operate on. For example, if your folder was an FTP folder, the context argument would allow you to specify an FTP proxy to go through.You don't need to specify the file permissions. If you have them, the folder will be deleted, and if you don't, it won't. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now