• 03-08-2010, 13:18:09
    #1
    Üyeliği durduruldu
    Parse error: syntax error, unexpected '"' in c:\appserv\www\account.php on line 21 veriyor.

    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>
  • 03-08-2010, 13:21:24
    #2
    <!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>

    Şöyle dener misin ?
  • 03-08-2010, 13:22:59
    #3
    Üyeliği durduruldu
    oldu teşekkürler peki $path = "C:\AppServ\www\\"; bu bölümü $path = "C:\AppServ\www\acc\\"; bu şekilde değiştirsem bişiy olurmu?
  • 03-08-2010, 13:26:31
    #4
    UniqueSOUL adlı üyeden alıntı: mesajı görüntüle
    oldu teşekkürler peki $path = "C:\AppServ\www\\"; bu bölümü $path = "C:\AppServ\www\acc\\"; bu şekilde değiştirsem bişiy olurmu?
    Aslında sorduğun bu sorunun cevabı sende Yazdığın kodda işlemi hangi klasörde yapmak istiyorsan o yolu yazmalısın. Yazılımsal olarak yazımda bir sorun yok.