HOME > 이용안내
이용안내
 
작성일 : 12-05-02 16:44
[스크립트언어] [php]링크 중에서 파일명만 뽑기
 글쓴이 : 제이네트워크
조회 : 42,355  
[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"
?>





Cloud server Streaming service Domain Cloud Firewall

 
 

Total 0

번호 제   목   글쓴이 날짜 조회
게시물이 없습니다.