[php] 특정 폴더내 파일 이름을 urlencode로 변경하기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[php] 특정 폴더내 파일 이름을 urlencode로 변경하기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 81,819회 작성일 12-01-15 04:21

본문

<?php
include_once("./_common.php"); // Can't access individual pages

$path = './Upload/';

$cnt = 0;

$dh = opendir($path);

while ( ($file=readdir($dh))!==false )

{

    if ( !is_file($path.$file)) continue;

    $oldname = basename($file);
    $newname = iconv("euc-kr", "utf-8", $oldname);

    rename($path.$oldname,$path.urlencode($newname));

    $cnt++;

}

closedir($dh);

echo $cnt.' ok';

?>

댓글목록

등록된 댓글이 없습니다.

Total 779건 11 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
529 제로 62080 06-02
528 제로 57744 04-20
527 제로 64949 04-11
526 제로 59393 03-14
525 제로 76280 02-13
524 제로 80024 02-09
523 제로 79258 02-08
522 제로 67516 02-08
521 제로 70373 01-31
520 제로 75808 01-28
519 제로 83877 01-27
518 제로 59713 01-26
517 제로 61750 01-24
516 제로 68546 01-24
515 제로 67251 01-24
514 제로 78219 01-24
513 제로 70997 01-24
512 제로 59583 01-23
열람중 제로 81820 01-15
510 제로 83904 01-15
509 제로 62376 01-10
508 제로 64314 01-04
507 제로 66678 12-27
506 제로 83096 12-14
505 제로 64503 12-10

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5470-4714
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
24,685
어제
11,101
최대
431,155
전체
6,724,725
Copyright (c) 株式会社YHPLUS. All rights reserved.