Php 在追加模式下写入文件时不向新行添加内容

Php 在追加模式下写入文件时不向新行添加内容,php,Php,但是输出是以->/nName:Name Posted/nColour:color Posted/n的形式写入get.php的 如果您有时间,请帮助,谢谢大家。字符是“\n”,而不是“/n”。只要替换它,它就会工作。字符是“\n”,而不是“/n”。只要替换它就行了。您不应该用\n代替/n吗您不应该用\n代替/n吗 <?php if(isset($_POST['submit'])){ $file="get.php"; $open = fopen($file,

但是输出是以->/nName:Name Posted/nColour:color Posted/n的形式写入get.php的
如果您有时间,请帮助,谢谢大家。

字符是“\n”,而不是“/n”。只要替换它,它就会工作。

字符是“\n”,而不是“/n”。只要替换它就行了。

您不应该用\n代替/n吗您不应该用\n代替/n吗
     <?php
    if(isset($_POST['submit'])){
    $file="get.php";
    $open = fopen($file, "a+"); //open the file, (get.php).

    fwrite($open, "Name: " .$_POST['user'] . "/n"); //print / write the name.
    fwrite($open, "Colour: ". $_POST['color'] . "/n"); //print / write the colour.
    fclose($open); //close the opened file 

    echo "Log File Entry Had Been Made"; 
    }
     ?>