PHP file creation-PHP source code

Source: Internet
Author: User
In php, I used fopen to create a file and r with the parameter. In this way, if the file exists, it will be opened, otherwise, a new file will be created. In php, I will use fopen to create a file and the parameter r to open the file if the file exists. Otherwise, a new file will be created.

Script ec (2); script

PHP-create a file
Before you can create any file, it already exists! In this lesson, you will learn how to create an archive using PHP.

Tizag.com
PHP-creates chaos
In PHP, commands used to create a file are also used to open the file. This seems a bit confusing, but we will try to clarify this problem.

The open function in PHP is used to open files. However, it can also create a file if it does not find the specified function call in the file. So, if you use to open a file that does not exist, it will create it because you open the file in writing or appended (

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.