xref: /PHP-7.1/main/fopen_wrappers.h (revision ccd4716e)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2018 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Author: Jim Winstead <jimw@php.net>                                  |
16    +----------------------------------------------------------------------+
17  */
18 
19 /* $Id$ */
20 
21 #ifndef FOPEN_WRAPPERS_H
22 #define FOPEN_WRAPPERS_H
23 
24 BEGIN_EXTERN_C()
25 #include "php_globals.h"
26 #include "php_ini.h"
27 
28 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle);
29 PHPAPI char *expand_filepath(const char *filepath, char *real_path);
30 PHPAPI char *expand_filepath_ex(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len);
31 PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int use_realpath);
32 
33 PHPAPI int php_check_open_basedir(const char *path);
34 PHPAPI int php_check_open_basedir_ex(const char *path, int warn);
35 PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path);
36 
37 /* OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */
38 #define OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
39 
40 PHPAPI int php_check_safe_mode_include_dir(const char *path);
41 
42 PHPAPI zend_string *php_resolve_path(const char *filename, int filename_len, const char *path);
43 
44 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_string **opened_path);
45 
46 PHPAPI char *php_strip_url_passwd(char *path);
47 
48 PHPAPI ZEND_INI_MH(OnUpdateBaseDir);
49 END_EXTERN_C()
50 
51 #endif
52 /*
53  * Local variables:
54  * tab-width: 4
55  * c-basic-offset: 4
56  * End:
57  */
58