Configuring System Constants
1. Check and configure these preferences when the file system is working
When the file system is running, these defaults will increase the security of the system appropriately, but the value of using octal is always correct when a single process is opened for each user at the bottom of PHP or Apache.
File_read_mode Mode of reading files
File_write_mode Write to file mode
Dir_read_mode Mode of reading directory
Dir_write_mode Write to Directory mode
2, File flow mode
These patterns are required when we use the 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 Code code as follows:
[PHP]
<?php if (! defined (' BasePath ')) exit (' No Direct script access allowed ');
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
| These prefs consoles, preferences are used when checking and setting modes when working
| With the file system. The defaults are fine fine on servers with proper
| Security, but/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 should
| Always is 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 Streaming mode
|--------------------------------------------------------------------------
| These modes are used if 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 with care
Define (' fopen_read_write_create_destructive ', ' w+b '); Truncates existing file data, use with 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 * *