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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 81,846회 작성일 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 제로 70140 06-14
578 제로 57682 06-07
577 제로 62101 06-02
576 제로 57761 04-20
575 제로 64984 04-11
574 제로 59411 03-14
573 제로 76318 02-13
572 제로 80067 02-09
571 제로 79289 02-08
570 제로 67546 02-08
569 제로 70398 01-31
568 제로 75842 01-28
567 제로 83910 01-27
566 제로 59731 01-26
565 제로 61769 01-24
564 제로 68577 01-24
563 제로 67280 01-24
562 제로 78253 01-24
561 제로 71031 01-24
560 제로 59604 01-23
열람중 제로 81847 01-15
558 제로 83938 01-15
557 제로 62393 01-10
556 제로 64343 01-04
555 제로 66707 12-27

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
9,377
어제
25,212
최대
431,155
전체
6,734,629
Copyright (c) 株式会社YHPLUS. All rights reserved.