$pfile=$_SERVER['DOCUMENT_ROOT']."\\users\\".$player.".ini"; $filehandle=fopen($pfile,"w"); if(!$filehandle) { echo 'failed'; }