How to create and remove directory / folder in PHP

How to create and remove directory / folder in PHP

Popular content

Donate to Us


Donate by clicking Ads :)

Who's online

There are currently 0 users and 18 guests online.

How to create and remove directory / folder in PHP

Remove directory$mydir = '/path/directory/images/'; // this will remove images directoryif (is_dir($mydir)) {rmdir($mydir);} else {echo $mydir.' does not exists';}Create$mydir = '/path/directory/images/mkdir($mydir);Heshan Wanigasooriya

Share/Save
6.25
Average: 6.3 (4 votes)
Your rating: None
Tags
Comments

Post new comment

 
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.