<?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)


![[GO] http请求の模块-微慑信息网-VulSee.com](https://vulsee.com/wp-content/uploads/2024/03/f14df9ce90c84d123ee4b413176ba391.png)




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

青云网
