Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:38:30+00:00 2026-05-28T18:38:30+00:00

How can i remove or delete a zip folder using php code? In my

  • 0

How can i remove or delete a zip folder using php code?

In my application i need to extract a zip folder after extaracting remove the zip folder.
How can i do this?

I can extract or unzip the zipped folder using php code that will successed.
But i dont know hot remove the zipped folder.

This is the code to extract zip folder:

$this->load->library('unzip');
$var = $this->unzip->extract('./folder/zip_foldername', './folder/newname');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:38:31+00:00Added an answer on May 28, 2026 at 6:38 pm

    Use the unlink() function

    http://www.php.net/manual/en/function.unlink.php

    Edit: after reading your post again I’m not sure I understood. Did you mean to delete the zip file or the resulting folder containing all the extracted files? If the the latter then you would first need to loop through that directory and use unlink to delete all of the files then use rmdir() to delete the directory

    http://php.net/manual/en/function.rmdir.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to delete a zip file using php How can I remove
I'm trying to bind a 1-many mapping using KnockoutJS, where 1 zip code can
One can remove all calls to printf() using #define printf . What if I
I was wondering if when using the datagridview control you can remove the thing
This is my warning. implicit declaration of function 'exit' How i can remove it.
Wordpress has a filter that automatically add paragraphs to posts. I can remove this
Can you remove an item from a List<> whilst iterating through it? Will this
I guys, i'm writting code to upload file, zip them and delete tmp file.
I am trying to remove a directory from my repository. I delete the folder
Remove objects in this code works fine in jquery 1.5, but doesn't work with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.