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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 92,405회 작성일 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 제로 79163 06-14
578 제로 65184 06-07
577 제로 69736 06-02
576 제로 66992 04-20
575 제로 74419 04-11
574 제로 67209 03-14
573 제로 86005 02-13
572 제로 90558 02-09
571 제로 88740 02-08
570 제로 76625 02-08
569 제로 79403 01-31
568 제로 86829 01-28
567 제로 93767 01-27
566 제로 66900 01-26
565 제로 69414 01-24
564 제로 77676 01-24
563 제로 75959 01-24
562 제로 88413 01-24
561 제로 79499 01-24
560 제로 68173 01-23
열람중 제로 92406 01-15
558 제로 96360 01-15
557 제로 70135 01-10
556 제로 73068 01-04
555 제로 75007 12-27

검색


사이트 정보

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

접속자집계

오늘
19,550
어제
169,434
최대
552,140
전체
15,805,756
Copyright (c) 株式会社YHPLUS. All rights reserved.