Lines Matching refs:filename
363 char *filename = NULL; local
402 …spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATO…
404 filename = SG(request_info).path_translated;
415 filename = emalloc(length + path_len + 2);
416 memcpy(filename, PG(doc_root), length);
417 if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
418 filename[length++] = PHP_DIR_SEPARATOR;
423 strncpy(filename + length, path_info, path_len + 1);
425 filename = SG(request_info).path_translated;
429 if (filename) {
430 resolved_path = zend_resolve_path(filename, strlen(filename));
434 if (SG(request_info).path_translated != filename) {
435 if (filename) {
436 efree(filename);
453 if (zend_stream_open(filename, file_handle) == FAILURE) {
455 if (SG(request_info).path_translated != filename) {
456 if (filename) {
457 efree(filename);
468 if (SG(request_info).path_translated != filename) {
472 SG(request_info).path_translated = filename;
482 PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_length, const char *path) argument
491 if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
496 for (p = filename; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++);
497 if ((*p == ':') && (p - filename > 1) && (p[1] == '/') && (p[2] == '/')) {
498 wrapper = php_stream_locate_url_wrapper(filename, &actual_path, STREAM_OPEN_FOR_INCLUDE);
507 if ((*filename == '.' &&
508 (IS_SLASH(filename[1]) ||
509 ((filename[1] == '.') && IS_SLASH(filename[2])))) ||
510 IS_ABSOLUTE_PATH(filename, filename_length) ||
516 filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
520 if (tsrm_realpath(filename, resolved_path)) {
548 memcpy(trypath+(end-ptr)+1, filename, filename_length+1);
558 memcpy(trypath+len+1, filename, filename_length+1);
597 memcpy(trypath+exec_fname_length + 1, filename, filename_length+1);
635 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_str… argument
647 if (!filename) {
651 filename_length = strlen(filename);
657 if ((*filename == '.')
659 || IS_ABSOLUTE_PATH(filename, filename_length)
662 return php_fopen_and_set_opened_path(filename, mode, opened_path);
699 if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
700 php_error_docref(NULL, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);