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