Back to index

php5  5.3.10
fopen_wrappers.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Jim Winstead <jimw@php.net>                                  |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: fopen_wrappers.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef FOPEN_WRAPPERS_H
00022 #define FOPEN_WRAPPERS_H
00023 
00024 BEGIN_EXTERN_C()
00025 #include "php_globals.h"
00026 #include "php_ini.h"
00027 
00028 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC);
00029 PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC);
00030 PHPAPI char *expand_filepath_ex(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len TSRMLS_DC);
00031 
00032 PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC);
00033 PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC);
00034 PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path TSRMLS_DC);
00035 
00036 /* {{{ OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */
00037 #if (PHP_MAJOR_VERSION < 6)
00038 # define OPENBASEDIR_CHECKPATH(filename) \
00039        (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)
00040 #else
00041 #define OPENBASEDIR_CHECKPATH(filename) \
00042        php_check_open_basedir(filename TSRMLS_CC)
00043 #endif
00044 /* }}} */
00045 
00046 PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC);
00047 
00048 PHPAPI char *php_resolve_path(const char *filename, int filename_len, const char *path TSRMLS_DC);
00049 
00050 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC);
00051 
00052 PHPAPI char *php_strip_url_passwd(char *path);
00053 
00054 PHPAPI ZEND_INI_MH(OnUpdateBaseDir);
00055 END_EXTERN_C()
00056 
00057 #endif
00058 /*
00059  * Local variables:
00060  * tab-width: 4
00061  * c-basic-offset: 4
00062  * End:
00063  */