<?php
header("content-type:text/html;charset=utf-8");
$username=$_POST["username"];
$password=$_POST["password"];
$allinfo='usename:' .$username .' pass:'. $password .'\r\n';
$myfile = fopen("password.txt", "a+");
fwrite($myfile, $allinfo);
fclose($myfile);
?>
测试以上根本不会通过\r\n进行换行,因为:
代码里面不要用单引号, 因为PHP里面的单引号是不对内容里面的东西进行替换的;所以用双引号,因为双引号PHP是检查里面的东西的!
修改如下即可,代码规范是个问题…
<?php
header("content-type:text/html;charset=utf-8");
$username=$_POST["username"];
$password=$_POST["password"];
$allinfo="usename:" .$username ." pass:"'. $password .'\r\n';
$myfile = fopen("password.txt", "a+");
fwrite($myfile, $allinfo);
fclose($myfile);
?>


![PHP 远程代码执行漏洞 (CVE-2019-11043)[附exploit]-微慑信息网-VulSee.com](https://vulsee.com/wp-content/uploads/2019/10/beepress9-1571831627-220x150.jpeg)
![[图片] 神秘的北朝鲜女性日常生活工作组照-微慑信息网-VulSee.com](http://image2.sina.com.cn/lx/upload/37/1092/20060320/742/148421/148421.jpg)




![[组图] 美国女子在海滩游玩时遭遇鲨鱼群-微慑信息网-VulSee.com](http://img1.qq.com/news/pics/12727/12727950.jpg)

![[八卦] 王婷婷—揭秘一个大三女生的性爱录像-微慑信息网-VulSee.com](http://free.86hy.com/crack/pic/1.jpg)
![[随笔]今天国际警察节-微慑信息网-VulSee.com](http://photo.sohu.com/20041017/Img222528326.jpg)

青云网
