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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 81,861회 작성일 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 제로 70156 06-14
578 제로 57692 06-07
577 제로 62119 06-02
576 제로 57768 04-20
575 제로 65000 04-11
574 제로 59415 03-14
573 제로 76330 02-13
572 제로 80080 02-09
571 제로 79306 02-08
570 제로 67561 02-08
569 제로 70409 01-31
568 제로 75855 01-28
567 제로 83919 01-27
566 제로 59744 01-26
565 제로 61779 01-24
564 제로 68582 01-24
563 제로 67292 01-24
562 제로 78270 01-24
561 제로 71048 01-24
560 제로 59609 01-23
열람중 제로 81862 01-15
558 제로 83951 01-15
557 제로 62401 01-10
556 제로 64359 01-04
555 제로 66725 12-27

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
11,790
어제
25,212
최대
431,155
전체
6,737,042
Copyright (c) 株式会社YHPLUS. All rights reserved.