Lines Matching refs:filename
351 char *filename = NULL; local
390 …spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATO…
392 filename = SG(request_info).path_translated;
403 filename = emalloc(length + path_len + 2);
404 memcpy(filename, PG(doc_root), length);
405 if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
406 filename[length++] = PHP_DIR_SEPARATOR;
411 strncpy(filename + length, path_info, path_len + 1);
413 filename = SG(request_info).path_translated;
417 if (filename) {
418 resolved_path = zend_resolve_path(filename, strlen(filename));
422 if (SG(request_info).path_translated != filename) {
423 if (filename) {
424 efree(filename);
441 if (zend_stream_open(filename, file_handle) == FAILURE) {
443 if (SG(request_info).path_translated != filename) {
444 if (filename) {
445 efree(filename);
456 if (SG(request_info).path_translated != filename) {
460 SG(request_info).path_translated = filename;
470 PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_length, const char *path) argument
479 if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
484 for (p = filename; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++);
485 if ((*p == ':') && (p - filename > 1) && (p[1] == '/') && (p[2] == '/')) {
486 wrapper = php_stream_locate_url_wrapper(filename, &actual_path, STREAM_OPEN_FOR_INCLUDE);
495 if ((*filename == '.' &&
496 (IS_SLASH(filename[1]) ||
497 ((filename[1] == '.') && IS_SLASH(filename[2])))) ||
498 IS_ABSOLUTE_PATH(filename, filename_length) ||
504 filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
508 if (tsrm_realpath(filename, resolved_path)) {
536 memcpy(trypath+(end-ptr)+1, filename, filename_length+1);
546 memcpy(trypath+len+1, filename, filename_length+1);
585 memcpy(trypath+exec_fname_length + 1, filename, filename_length+1);
623 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_str… argument
635 if (!filename) {
639 filename_length = strlen(filename);
645 if ((*filename == '.')
647 || IS_ABSOLUTE_PATH(filename, filename_length)
650 return php_fopen_and_set_opened_path(filename, mode, opened_path);
687 if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
688 php_error_docref(NULL, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);