Lines Matching refs:filename
356 char *filename = NULL; local
395 …spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATO…
397 filename = SG(request_info).path_translated;
408 filename = emalloc(length + path_len + 2);
409 memcpy(filename, PG(doc_root), length);
410 if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
411 filename[length++] = PHP_DIR_SEPARATOR;
416 strncpy(filename + length, path_info, path_len + 1);
418 filename = SG(request_info).path_translated;
422 if (filename) {
423 resolved_path = zend_resolve_path(filename, (int)strlen(filename));
427 if (SG(request_info).path_translated != filename) {
428 if (filename) {
429 efree(filename);
446 if (zend_stream_open(filename, file_handle) == FAILURE) {
448 if (SG(request_info).path_translated != filename) {
449 if (filename) {
450 efree(filename);
461 if (SG(request_info).path_translated != filename) {
465 SG(request_info).path_translated = filename;
475 PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length, const char *path) argument
484 if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
489 for (p = filename; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++);
490 if ((*p == ':') && (p - filename > 1) && (p[1] == '/') && (p[2] == '/')) {
491 wrapper = php_stream_locate_url_wrapper(filename, &actual_path, STREAM_OPEN_FOR_INCLUDE);
500 if ((*filename == '.' &&
501 (IS_SLASH(filename[1]) ||
502 ((filename[1] == '.') && IS_SLASH(filename[2])))) ||
503 IS_ABSOLUTE_PATH(filename, filename_length) ||
509 filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
513 if (tsrm_realpath(filename, resolved_path)) {
541 memcpy(trypath+(end-ptr)+1, filename, filename_length+1);
551 memcpy(trypath+len+1, filename, filename_length+1);
587 memcpy(trypath+exec_fname_length + 1, filename, filename_length+1);
622 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_str… argument
634 if (!filename) {
638 filename_length = (int)strlen(filename);
644 if ((*filename == '.')
646 || IS_ABSOLUTE_PATH(filename, filename_length)
649 return php_fopen_and_set_opened_path(filename, mode, opened_path);
686 if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
687 php_error_docref(NULL, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);