Lines Matching refs:filename

354 	char *filename = NULL;  local
393 …spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATO…
395 filename = SG(request_info).path_translated;
406 filename = emalloc(length + path_len + 2);
407 memcpy(filename, PG(doc_root), length);
408 if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
409 filename[length++] = PHP_DIR_SEPARATOR;
414 strncpy(filename + length, path_info, path_len + 1);
416 filename = SG(request_info).path_translated;
420 if (filename) {
421 resolved_path = zend_resolve_path(filename, strlen(filename));
425 if (SG(request_info).path_translated != filename) {
426 if (filename) {
427 efree(filename);
444 if (zend_stream_open(filename, file_handle) == FAILURE) {
446 if (SG(request_info).path_translated != filename) {
447 if (filename) {
448 efree(filename);
459 if (SG(request_info).path_translated != filename) {
463 SG(request_info).path_translated = filename;
473 PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_length, const char *path) argument
482 if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
487 for (p = filename; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++);
488 if ((*p == ':') && (p - filename > 1) && (p[1] == '/') && (p[2] == '/')) {
489 wrapper = php_stream_locate_url_wrapper(filename, &actual_path, STREAM_OPEN_FOR_INCLUDE);
498 if ((*filename == '.' &&
499 (IS_SLASH(filename[1]) ||
500 ((filename[1] == '.') && IS_SLASH(filename[2])))) ||
501 IS_ABSOLUTE_PATH(filename, filename_length) ||
507 filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
511 if (tsrm_realpath(filename, resolved_path)) {
539 memcpy(trypath+(end-ptr)+1, filename, filename_length+1);
549 memcpy(trypath+len+1, filename, filename_length+1);
585 memcpy(trypath+exec_fname_length + 1, filename, filename_length+1);
620 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_str… argument
632 if (!filename) {
636 filename_length = strlen(filename);
642 if ((*filename == '.')
644 || IS_ABSOLUTE_PATH(filename, filename_length)
647 return php_fopen_and_set_opened_path(filename, mode, opened_path);
684 if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
685 php_error_docref(NULL, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);