PHP 中的 PHP Web 服务器? [英] PHP web server in PHP?

查看:31
本文介绍了PHP 中的 PHP Web 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即用 PHP 应用程序替换 Apache,该应用程序在发送对 .php 文件的 http 请求时发回 html 文件?

i.e to replace Apache with a PHP application that sent back html files when http requests for .php files are sent?

这有多实用?

推荐答案

已经做了,但是如果你想知道它有多实用,那么我建议你安装并使用 Apache bench 进行测试以查看结果:

It's already been done but if you want to know how practical it is, then i suggest you install and test with Apache bench to see the results:

http://nanoweb.si.kz/

Edit, A benchmark from the site:

Server Software:        aEGiS_nanoweb/2.0.1-dev
Server Hostname:        si.kz
Server Port:            80

Document Path:          /six.gif
Document Length:        28352 bytes

Concurrency Level:      20
Time taken for tests:   3.123 seconds
Complete requests:      500
Failed requests:        0
Broken pipe errors:     0
Keep-Alive requests:    497
Total transferred:      14496686 bytes
HTML transferred:       14337322 bytes
Requests per second:    160.10 [#/sec] (mean)
Time per request:       124.92 [ms] (mean)
Time per request:       6.25 [ms] (mean, across all concurrent requests)
Transfer rate:          4641.91 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    1.9      0    13
Processing:    18   100  276.4     40  2739
Waiting:        1    97  276.9     39  2739
Total:         18   100  277.8     40  2750

Percentage of the requests served within a certain time (ms)
  50%     40
  66%     49
  75%     59
  80%     69
  90%    146
  95%    245
  98%    449
  99%   1915
 100%   2750 (last request)

这篇关于PHP 中的 PHP Web 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆