摘要: 在apache / bin/ab.exe 可以做压力测试,该工具可以模拟多人,并发访问某个页面.基本的用法ab.exe –n 10000 –c 10-n 表示请求多少次-c 表示多少人如果要测试php自己的缓存机制, 需要做配置.php.ini 文件display_errors=Onoutput_buffering=Offerror_reproting= 设置错误级别看一段代码,使用缓存时,在发送文件头之前可以显示文字.<?php echo“yyy”; header(“content-type:text/htm;charset=utf-8”); echo“hello”;?>PHP缓 阅读全文
posted @ 2013-04-06 22:36 /折磨 阅读(9393) 评论(0) 推荐(1) 编辑
摘要: 1 <?php 2 require_once './config.inc.php'; 3 $m = new Model(); 4 $ids = $m->getAll("SELECT id FROM article ORDER BY id ASC"); 5 foreach ($ids as $rowIdArr) { 6 $idStr .= $rowIdArr['id'].','; 7 } 8 $idStr = rtrim($idStr, ','); // 所有文章的 ID 号集合 9 $idArr = 阅读全文
posted @ 2013-04-06 22:15 /折磨 阅读(991) 评论(0) 推荐(0) 编辑