현재 위치: > 함수 카테고리 모음> dirname

dirname

경로의 디렉토리 부분으로 돌아갑니다
이름:dirname
분류:파일 시스템
사용 언어:php
한 줄 설명:경로에서 디렉토리 이름 부분을 반환합니다.

 <span class="token php language-php"><span class="token delimiter important"><? php</span>
<span class="token keyword">echo</span> <span class="token function">dirname</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"c : /testweb/home.php"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token keyword">echo</span> <span class="token function">dirname</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"/testweb/home.php"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

산출:

 C :/TestWeb
/testweb
유사한 함수
  • 파일 수정 시간을 얻습니다 filemtime

    filemtime

    파일수정시간을얻습니다
  • RealPath 캐시 항목을 얻으십시오 realpath_cache_get

    realpath_cache_get

    RealPath캐시항목을얻으십시오
  • 문서에 대한 정보를 제공합니다 stat

    stat

    문서에대한정보를제공합니다
  • 주어진 파일 이름이 실행 가능한지 확인하십시오 is_executable

    is_executable

    주어진파일이름이실행가능한지확인하십시오
  • 파일 액세스 및 수정 시간을 설정하십시오 touch

    touch

    파일액세스및수정시간을설정하십시오
  • 파일 포인터에서 줄을 읽고 CSV 필드를 구문 분석합니다. fgetcsv

    fgetcsv

    파일포인터에서줄을읽고CSV필드를구문분
  • 파일을 복사하십시오 copy

    copy

    파일을복사하십시오
  • 파일 소유자를 얻으십시오 fileowner

    fileowner

    파일소유자를얻으십시오