return NULL;
}
if (php_check_open_basedir(path)) return NULL;
- return fopen(path, mode);
+ return PHP_FOPEN(path, mode);
}
}
SG(request_info).path_translated = NULL;
return NULL;
}
- fp = fopen(fn, "r");
+ fp = PHP_FOPEN(fn, "r");
/* refuse to open anything that is not a regular file */
if (fp && (0 > fstat(fileno(fp), &st) || !S_ISREG(st.st_mode))) {
return NULL;
}
if (php_check_open_basedir(filename)) return NULL;
- fp = fopen(filename, mode);
+ fp = PHP_FOPEN(filename, mode);
if (fp && opened_path) {
*opened_path = expand_filepath(filename);
}
return NULL;
}
if (php_check_open_basedir(trypath)) return NULL;
- fp = fopen(trypath, mode);
+ fp = PHP_FOPEN(trypath, mode);
if (fp && opened_path) {
*opened_path = expand_filepath(trypath);
}
return fp;
} else {
if (php_check_open_basedir(filename)) return NULL;
- return fopen(filename, mode);
+ return PHP_FOPEN(filename, mode);
}
}
if (!path || (path && !*path)) {
return NULL;
}
if (php_check_open_basedir(filename)) return NULL;
- fp = fopen(filename, mode);
+ fp = PHP_FOPEN(filename, mode);
if (fp && opened_path) {
*opened_path = strdup(filename);
}
return NULL;
}
}
- if ((fp = fopen(trypath, mode)) != NULL) {
+ if ((fp = PHP_FOPEN(trypath, mode)) != NULL) {
if (php_check_open_basedir(trypath)) {
fclose(fp);
efree(pathbuf);
if (php_check_open_basedir((char *) path)) {
fp = NULL;
} else {
- fp = fopen(path, mode);
+ fp = PHP_FOPEN(path, mode);
}
}
}