PHP for file Operations _php Tutorial

Source: Internet
Author: User
1. Open the file, close the directory, read the file

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

Create success!

The same function that deletes the directory is rmdir


3. Change the current directory

Chidir

Get current directory GETCWD


Code


Run



4. Open files and write files, delete files

fopen fwrite Unlink


A: Open in write mode


Open the test file



Success!


Next is the test to delete the file



Test







http://www.bkjia.com/PHPjc/735867.html www.bkjia.com true http://www.bkjia.com/PHPjc/735867.html techarticle 1. Open file, close directory, read file Opendir closedir readdir run 2. Create directory mkdir vcd4kpha+pgltzybzcmm9 "http://www.2cto.com/uploadfile/ collfiles/20140303/2014030309 ...

  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.