<?php header("Content-type: text/html; charset=utf-8"); //空のファイルを作成 @touch("test.dat"); if(@rename("test.dat", "test.txt")){ echo "ファイル名を変更しました!<br>"; } else{ echo "ファイル名を変更できませんでした!<br>"; } ?>