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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 92,695회 작성일 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 829건 11 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
579 제로 79523 06-14
578 제로 65414 06-07
577 제로 70084 06-02
576 제로 67278 04-20
575 제로 74669 04-11
574 제로 67444 03-14
573 제로 86269 02-13
572 제로 90878 02-09
571 제로 89013 02-08
570 제로 76852 02-08
569 제로 79691 01-31
568 제로 87149 01-28
567 제로 94062 01-27
566 제로 67113 01-26
565 제로 69664 01-24
564 제로 77991 01-24
563 제로 76285 01-24
562 제로 88709 01-24
561 제로 79800 01-24
560 제로 68506 01-23
열람중 제로 92696 01-15
558 제로 96692 01-15
557 제로 70348 01-10
556 제로 73372 01-04
555 제로 75252 12-27

검색


사이트 정보

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

접속자집계

오늘
22,315
어제
37,399
최대
552,140
전체
16,165,969
Copyright (c) 株式会社YHPLUS. All rights reserved.