PHP file operations_PHP tutorial

WBOY
Release: 2016-07-13 10:37:28
Original
895 people have browsed it

1. Open files, close directories, and read files

opendir closedir readdir


Run



2. Create directory mkdir喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PGltZyBzcmM9"http://www.2cto.com/uploadfile/Collfiles/20140303/20140303094606311.png" alt="">

Run

Created successfully!

Similarly, the function to delete a directory is rmdir


3. Change the current directory

chidir

Get the current directory getcwd


Code


Run



4. Open files, write files, delete files

fopen fwrite unlink


a: Open for writing


Open test file



Success!


Next is the test of deleting files



Test







www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/735867.htmlTechArticle1. Open the file, close the directory, read the file opendir closedir readdir run 2. Create the directory mkdir vcD4KPHA+PGltZyBzcmM9" http://www.2cto.com/uploadfile/Collfiles/20140303/2014030309...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template