account.php şu şekilde
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
</head>
<body>
<?
$user = $_POST['user'];
echo $user
?>
<?
$userpw = $_POST['userpw'];
echo $userpw
?>
<?php
$path = "C:\AppServ\www\";
$datei = $user.".ini";
// prüfen, ob es diesen Pfad schon gibt:
if(!dirname($path)!= $path)
{
// prüfen, ob es die Datei schon gibt
if(file_exists($path.$datei))
{ echo "Dublicatet Username<br>"; }
else
{ echo "Account creation was Succesfull<br>"; }
// Datei neu anlegen bzw. öffnen
$file = fopen($path.$datei, "w");
// in die Datei schreiben
$geschrieben = fwrite($file, "[account]\r\npassword=$userpw");
// Datei schliessen
fclose($file);
}
?>
</body>
</html>
Yazdığın kodda işlemi hangi klasörde yapmak istiyorsan o yolu yazmalısın. Yazılımsal olarak yazımda bir sorun yok.