Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
aynı dizinde bulunan bozuk türkçe karakterlerini düzeltir.
<?php
$dir = opendir(".");
$ara = array ('ı','Å?','ü','ç','ö','Ä?','ÅŸ','Ç','Ä°','ÄŸ','Åž','Ö','Ãœ','ı','Å?','ç','ö','Ä?','ÅŸ','Ç','Ä°','ÄŸ','Åž','Ö','Ãœ','ü','ÄŸ');
$degis = array ('ı','ş','ü','ç','ö','ğ','ş','Ç','i','ğ','Ş','Ö','Ü','ı', 'ş', 'ç', 'ö', 'ğ', 'ş', 'Ç', 'i', 'ğ', 'Ş', 'Ö', 'Ü', 'ü', 'ğ');
$yeni = str_replace($ara, $degis, $yazi);
while (($dosya = readdir($dir)) !== false)
{
if(! is_dir($dosya)){
$ara = array ('ı','Å?','ü','ç','ö','Ä?','ÅŸ','Ç','Ä°','ÄŸ','Åž','Ö','Ãœ','ı','Å?','ç','ö','Ä?','ÅŸ','Ç','Ä°','ÄŸ','Åž','Ö','Ãœ','ü','ÄŸ');
$degis = array ('ı','ş','ü','ç','ö','ğ','ş','Ç','i','ğ','Ş','Ö','Ü','ı', 'ş', 'ç', 'ö', 'ğ', 'ş', 'Ç', 'i', 'ğ', 'Ş', 'Ö', 'Ü', 'ü', 'ğ');
$yeni = str_replace($ara, $degis, $dosya);
rename($dosya,$yeni);
}
}
closedir($dir);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.