Created
November 5, 2018 09:06
-
-
Save numanturle/b37589a026fb6f3a099027bf2e982b56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aynı dizinde bulunan bozuk türkçe karakterlerini düzeltir. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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