Lines Matching refs:filename
358 char *filename = NULL; local
397 …spprintf(&filename, 0, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATO…
399 filename = SG(request_info).path_translated;
410 filename = emalloc(length + path_len + 2);
411 if (filename) {
412 memcpy(filename, PG(doc_root), length);
413 if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
414 filename[length++] = PHP_DIR_SEPARATOR;
419 strncpy(filename + length, path_info, path_len + 1);
422 filename = SG(request_info).path_translated;
426 if (filename) {
427 resolved_path = zend_resolve_path(filename, (int)strlen(filename));
431 if (SG(request_info).path_translated != filename) {
432 if (filename) {
433 efree(filename);
450 if (zend_stream_open(filename, file_handle) == FAILURE) {
452 if (SG(request_info).path_translated != filename) {
453 if (filename) {
454 efree(filename);
465 if (SG(request_info).path_translated != filename) {
469 SG(request_info).path_translated = filename;
479 PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length, const char *path) argument
488 if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
493 for (p = filename; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++);
494 if ((*p == ':') && (p - filename > 1) && (p[1] == '/') && (p[2] == '/')) {
495 wrapper = php_stream_locate_url_wrapper(filename, &actual_path, STREAM_OPEN_FOR_INCLUDE);
504 if ((*filename == '.' &&
505 (IS_SLASH(filename[1]) ||
506 ((filename[1] == '.') && IS_SLASH(filename[2])))) ||
507 IS_ABSOLUTE_PATH(filename, filename_length) ||
513 filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
517 if (tsrm_realpath(filename, resolved_path)) {
545 memcpy(trypath+(end-ptr)+1, filename, filename_length+1);
555 memcpy(trypath+len+1, filename, filename_length+1);
591 memcpy(trypath+exec_fname_length + 1, filename, filename_length+1);
626 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, zend_str… argument
638 if (!filename) {
642 filename_length = (int)strlen(filename);
648 if ((*filename == '.')
650 || IS_ABSOLUTE_PATH(filename, filename_length)
653 return php_fopen_and_set_opened_path(filename, mode, opened_path);
690 if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
691 php_error_docref(NULL, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);