CI框架源码阅读,系统常量文件constants.php的配置
程序员文章站
2022-06-04 18:49:13
配置系统常量 1、当文件系统工作的时候检查并配置这些首选项文件系统运行的时候这些默认的值会适当的增加系统的安全性,但是在php或apache的底层单独的为每各用户开一个进程...
配置系统常量
1、当文件系统工作的时候检查并配置这些首选项
文件系统运行的时候这些默认的值会适当的增加系统的安全性,但是在php或apache的底层单独的为每各用户开一个进程的时候,使用八进制的值永远是正确的
file_read_mode 读取文件的模式
file_write_mode 写入文件的模式
dir_read_mode 读取目录的模式
dir_write_mode 写入目录的模式
2、文件流模式
当我们使用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');
文件源码:
[php]
<?php if ( ! defined('basepath')) exit('no direct script access allowed');
/*
|--------------------------------------------------------------------------
| file and directory modes
|--------------------------------------------------------------------------
| these prefs 控制台、首选项 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 should
| always be 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 文件流模式
|--------------------------------------------------------------------------
| these modes are 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 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 */
1、当文件系统工作的时候检查并配置这些首选项
文件系统运行的时候这些默认的值会适当的增加系统的安全性,但是在php或apache的底层单独的为每各用户开一个进程的时候,使用八进制的值永远是正确的
file_read_mode 读取文件的模式
file_write_mode 写入文件的模式
dir_read_mode 读取目录的模式
dir_write_mode 写入目录的模式
2、文件流模式
当我们使用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');
文件源码:
复制代码 代码如下:
[php]
<?php if ( ! defined('basepath')) exit('no direct script access allowed');
/*
|--------------------------------------------------------------------------
| file and directory modes
|--------------------------------------------------------------------------
| these prefs 控制台、首选项 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 should
| always be 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 文件流模式
|--------------------------------------------------------------------------
| these modes are 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 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 */
上一篇: 吃什么食物对小儿感冒有好处
下一篇: 长期喝绿茶对眼睛有什么好处
推荐阅读
-
CI框架源码阅读,系统常量文件constants.php的配置
-
CI框架源码翻阅-系统常量文件constants.php
-
CI框架源码阅读,系统常量文件constants.php的配置_PHP教程
-
CI框架源码阅读,系统常量文件constants.php的配置
-
CI框架源码阅读,系统常量文件constants.php的配置_php技巧
-
CI框架源码阅读,系统常量文件constants.php的配置
-
CI框架源码阅读,系统常量文件constants.php的配置_PHP
-
CI框架源码阅读---------系统常量文件constants.php_PHP教程
-
CI框架源码阅读---------系统初始化文件_PHP教程
-
CI框架源码阅读,系统常量文件constants.php的配置_PHP