A Directory Operations
BaseName--Returns the file name portion of the path
DirName--Returns the directory portion of the path
PathInfo--Returns information about the file path
Realpath--Returns the normalized absolute path name
Copy CodeThe code is
a more comprehensive set of PHP tutorials , basic video and some small combat projects, below is the video directoryCD-ROM (i) \php employment Class (I.)CD-ROM (i) \php Technical exchange zone. URLCD-ROM (i) \ "Wisdom Special issue" belongs to it
Why should I copy a copy of php after installing php. ini to usrlocalphplibphp. ini I tried it. If you do not copy a copy of php, it will work normally. Why do you need to copy a copy of php from the installation package. ini to usrlocalphplibphp.
Today, we mainly introduce the application of file directory function in the development of PHP website. In the development of PHP website, we often need to read directory file information or create a directory to store the necessary files, and when
Details the php file directory base operation,
We know that the temporary declaration of the variable is stored in memory, even if it is a static variable, the script will be released after the run, so, want to persist the contents of a variable,
One: Directory operations
The first introduction is a function read from the directory, Opendir (), Readdir (), Closedir (), using the file handle is opened first, and then the iteration is listed:
Copy CodeThe code is as follows:
$base _dir =
One: Catalog operations
The first is a function read from the directory, Opendir (), Readdir (), Closedir (), which is used to open the file handle first and then iterate over the following list:
Copy Code code as follows:
$base
We know that the temporary declarations of variables are stored in memory, even static variables, after the script is finished will be released, so, want to save the content of a variable for a long time, one way is to write to the file, put on the
In PHP file operation is nothing more than a file read and write operations, delete operations, judgment operations, permissions operations and some file search, and so on, I will learn the PHP file operation function for everyone to post it.
File
1. File directory operation
The topmost stop is the disk root directory, with '/' or '//'
Current directory./
.. /indicates that the Apache directory is the Htdocs directory
1. Creating and Deleting Directories mkdir
Copy CodeThe code is as follows:
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.