CI framework source code reading, system constant File constants. php configuration
Source: Internet
Author: User
CI framework source code reading, the configuration of the system constant File constants. php, you can refer to the configuration of the system constant
1. check and configure these preferences when the file system is working.
When the file system is running, these default values will increase the security of the system. However, when the underlying layer of php or apache separately opens a process for each user, the octal value is always correct.
FILE_READ_MODE: file reading mode
FILE_WRITE_MODE: file writing mode
DIR_READ_MODE: Directory reading mode
DIR_WRITE_MODE: Directory writing mode
2. file stream mode
These modes are required when we use fopen ()/popen ().
Define ('fopen _ read', 'RB ');
Define ('fopen _ READ_WRITE ', 'R + B ');
Define ('fopen _ write_create_destructive', 'wb ');
Define ('fopen _ READ_WRITE_CREATE_DESTRUCTIVE ', 'W + B ');
Define ('fopen _ WRITE_CREATE ',' AB ');
Define ('fopen _ READ_WRITE_CREATE ', 'A + B ');
Define ('fopen _ WRITE_CREATE_STRICT ', 'xb ');
Define ('fopen _ READ_WRITE_CREATE_STRICT ', 'x + B ');
File source code:
Copy codeThe code is as follows:
[Php]
/*
| --------------------------------------------------------------------------
| File and Directory Modes
| --------------------------------------------------------------------------
| These prefs console, preferences are used when checking and setting modes when working
| With the file system. The defaults are fine on servers with proper
| Security, but you may wish (or even need) to change the values in
| Certain environments (Apache running a separate process for each
| User, PHP under CGI with Apache suEXEC, etc.). Octal values shold
| Always be used to set the mode correctly.
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