The rmdir () function deletes an empty directory.
Cases
The code is as follows
Copy Code
$path = "Images";if (!rmdir ($path)){Echo ("Could not remove $path");}Else{Echo ' Delete directory failed because images is not
This example describes how PHP uses recursive methods to list all the files in the current directory. Share to everyone for your reference. The implementation methods are as follows:
function FileList ($pathname, $i) {Define a filelist
Morning just to the company, the head told me, to write a small function, used to statistics specified in the directory file size, I have a go, do it, fortunately a little foundation, a will be completed, haha. The code is below.
?
/**
Dim upload, File, MaxWidth, maxheight, Ofilestream, Bytes, ratio1, Ratio2
Set upload = new Upload_fileSet file = Upload.file ("pic")
MaxWidth = CInt (upload. Form ("width")MaxHeight = CInt (upload. Form ("height")
If file. FileSize > 0 Then
PHP is a fast, reliable, cross-platform application, open source code, and so on, making PHP one of the most popular server-side script language. I based on my experience in the work, to introduce you to the use of PHP experience, I hope to help you.
Program
Php+java's Program
.....................
Java Program:
/*The following procedure is a timing tracing analysis program for the futures trading data of Yuyao Plastics cityis a preliminary analysis of the data, drawing analysis to the further
PHP has a lot of file system-related functions, not only can help you open the file, you can also display the contents of the directory, mobile files and so on. Many people even use PHP to write a web-based file manager.
First you need to
[Program Language] Php
[Source Source] Http://px.sklar.com
[Feature description] The script reads the file names from a specified directory, returns them to the array, and includes the number of files.
The source code is as follows:
?
/*
This
?
It is convenient to call this class to view all the files in the specified directory in a tree structure, if you want to know what subdirectories and files are in a directory.
# Examples of demonstrations:
$t = new Treeclimber ("ASP"); Create a
Focus on the application of file functions in PHP
PHP has many file system-related functions that not only open files, but also display content, move files, and other features in the directory, and many people even use PHP to develop internet-based
Site original content, reproduced please indicate the source Web page teaching network .
How do we create our first PHP page? It's very simple! Choose one of the best design tools we use, and of course you can just use Notepad. After you create it,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.