PHP file () function

Source: Internet
Author: User

Syntax:

Definition and usage
This file () reads a file to an array.

Each array element is contained from this file, and linefeeds are still valued.

Syntax

File (path, include_path, context)
ParameterDescription
PathFile path
Include_path
Optional. Set this parameter to '1' if you want to search the include_path file (in php. ini) and
Context
Optional. File processing within the specified range. The background is a set of options that can be modified. You can skip null.

Tips and instructions
Tip: This function is a binary secure PHP 4.3. (This means that the two binary data, such as image and character data, can be written to this function ).


--------------------------------------------------------------------------------

For example

Print_r (file ("test.txt");?>

 

Output.

 

Array ([0] =>
[1] => B. [2] => c, [3] => d ?)

 

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.