Hey,
I have wrote some code to unlink all the files in my directory and then delete the directory.
All my files on my remote server gets unlinked besides the following 2 following files
. DS_STORE and .ftpqutoa.
Below is the code that I have written to unlink all files and delete all the code.
Any ideas on how to solve this?
All help is highly appreciated.
Thanks!
?php if(isset($_POST['submit'])) { $store = $_POST['id']; // assign the store ID to the $store variable foreach ($store as $id) { // Run a foreach loop to get the store id $query = "SELECT * FROM stores WHERE id = {$id} "; // Run the query for the specific store id $result_query = mysql_query($query,$connection); // Execute the query $result = mysql_fetch_array($result_query,$connection); // Run a mysql fetch array on the result query $store_name = $result['store_name']; // get the store name $menus_dir_path = "stores/".$store_name;// Path to the menus assets $array_map_menus= array_map("unlink", glob($menus_dir_path."/*.*")); //rmdir($menus_dir_path); }// end of if(isset($_POST['submit'])) { on line 13 }// end of foreach ($store as $store_id) { on line 15