Touch ile UTF-8 Bom’suz Php Dosyası Oluşturmak

Hem ANSI hem UTF8 dosya kodlaması üzerinde çalıştırılıp doğruluğu kanıtlanmıştır.

<?php 
function phpfilemaker($filename){
 ini_set('default_charset','UTF-8');
 header('Content-Type: text/html; charset=UTF-8');
 touch ($filename.".php");
 $islem=fopen($filename.".php",'a');
 fputs($islem,'<?php ?>');
 fclose($islem);
 return true;
}
phpfilemaker("a");
?>