捕获php请求内容
2015-06-12 14:57
465 查看
通过将phpinfo()打印到文件实现
获取CURLOPT_POSTFIELD的内容 用file_get_contents("php://input")
<?php echo str_pad('', 1024);//使缓冲区溢出 ob_start();//打开缓冲区 phpinfo(); $string = ob_get_contents();//获取缓冲区内容 $myfile = fopen("phpinfo.html", "w") or die("Unable to open file!"); fwrite($myfile, $string); fclose($myfile); ob_end_clean();//清空并关闭缓冲区 ?>
获取CURLOPT_POSTFIELD的内容 用file_get_contents("php://input")
<?php $myfile = fopen('upload_files/'.$_REQUEST['file_id'], "w") or die("Unable to open file!"); fwrite($myfile, file_get_contents("php://input")); fclose($myfile); ?>
相关文章推荐
- YII2-数据库yii\db\Query 查询方法
- YII2-数据查询Active Record方法
- php之路
- PHP获取用户访问IP地址的5种方法
- YII2-数据库数据查询方法,关联查询with, joinWith区别和分页
- 编译php模块
- PHP限制IP访问 只允许指定IP访问 允许*号通配符过滤IP
- php socket类
- PHP 的DataGrid 分页
- PHP的JSON处理方式,
- 为什么PHP能够受到大家追捧和喜爱,又为什么饱受嘲讽?
- 用二十秒记住几个PHP基础知识点
- sublime phpcs
- php curl
- PHP安装,报错信息和解决过程
- TP-Link路由器端口映射8081端口的Nexus服务外网无法访问的解决办法
- PHP中读取大文件实现方法详解
- Yii学习笔记之六(HTML生成帮助类api 翻译)
- laravel5学习笔记(3)——复杂的路由
- php结合ACCESS的跨库查询功能