내가 다음 코드를 사용하여 폴더에있는 모든 사진 파일의 파일 확장자를 변경하려고했습니다 :폴더에있는 모든 파일의 이름을 바꿀 수 없습니다
$dh = opendir('JS2C');
$files = array();
while (($file = readdir($dh)) !== false) {
if($file !== '.' && $file !== '..') {
$file = pathinfo($file);
rename($file, $new . '.jpg');
}
}
를 내가받을 다음과 같은 경고 메시지 :
SCREAM: Error suppression ignored for
Warning: rename(ANAZODO.gif,ANAZODO.jpg):
The system cannot find the file specified. (code: 2) in C:\wamp2\www\ckcportal\batch2.php on ...
파일이 들어있는 폴더는 PHP
스크립트가있는 동일한 폴더에 있습니다.