logo

copy
고객센터 > 이용안내
[php]링크 중에서 파일명만 뽑기 | 스크립트언어
관리자 12-05-02 16:43 12052
[php]링크 중에서 파일명만 뽑기
 
 
string basename(string path, string suffix)

* path란 전체 파일의 전체 경로명을 인수로 받아 파일명만을 반환한다.
* suffix : 출력되는 파일명의 끝부분의 문자를 삽입시 생략이 된다.

<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);         // $file is set to "index.php"
$file = basename($path, ".php"); // $file is set to "index"
?>
 
   

교회홈페이지제작
대용량동영상서비스
무료SMS솔루션
QT나눔
신앙도서
온라인성경
크리스찬
연합신문
성경타자
설교방송
CCM 방송
성경연구