CI Framework source reading, system constant file constants.php configuration _php Tutorial

Source: Internet
Author: User
Configuring System Constants
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 appropriately, but the value of octal is always correct when a single process is opened for each user at the bottom of PHP or Apache.
File_read_mode mode for reading files
File_write_mode Write to file mode
Dir_read_mode reading the directory mode
Dir_write_mode Write to Directory mode


2. File stream mode
These patterns 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:
Copy CodeThe code is as follows:
[PHP]

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------

| These prefs console, preferences is used when checking and setting modes when working
| With the file system. The defaults is fine fine on servers with proper
| Security, but could 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 should
| Always being used to set the mode correctly.

*/
Define (' File_read_mode ', 0644);
Define (' File_write_mode ', 0666);
Define (' Dir_read_mode ', 0755);
Define (' Dir_write_mode ', 0777);

/*
|--------------------------------------------------------------------------
| File stream Modes-flow mode
|--------------------------------------------------------------------------

| These modes is used when working with fopen ()/popen ()

*/

Define (' Fopen_read ', ' RB ');
Define (' Fopen_read_write ', ' r+b ');
Define (' fopen_write_create_destructive ', ' WB '); Truncates existing file data, use and care
Define (' fopen_read_write_create_destructive ', ' w+b '); Truncates existing file data, use and care
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 ');


/* End of File constants.php */
/* location:./application/config/constants.php */

http://www.bkjia.com/PHPjc/326564.html www.bkjia.com true http://www.bkjia.com/PHPjc/326564.html techarticle Configuring System Constants 1, when the file system is working to check and configure these preferences file system to run when these default values will appropriately increase the security of the system, but in PHP or ...

  • 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.