Home  >  Article  >  Backend Development  >  Simple usage of php to delete directory through rmdir, phprmdir directory usage_PHP tutorial

Simple usage of php to delete directory through rmdir, phprmdir directory usage_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:02:45757browse

The simple usage of php to delete the directory through rmdir, the usage of phprmdir directory

The example in this article describes the simple usage of php to delete the directory through rmdir. Share it with everyone for your reference. The specific analysis is as follows:

php can delete a directory on the server through the rmdir() function. The is_dir() function is used in the following code. This function is used to determine whether the specified string is a directory. If the deletion is successful, it returns True, otherwise it returns False

<&#63;php
if (!is_dir('exampledir')) {
  mkdir('exampledir');
}
rmdir('exampledir');
&#63;>

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/969498.htmlTechArticleThe simple usage of php to delete the directory through rmdir, phprmdir directory usage This article explains the simple usage of php to delete the directory through rmdir . Share it with everyone for your reference. The specific analysis is as follows:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn