«   2018/12   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Archives
Today
48
Total
1,189,895
안정적인 DNS서비스 DNSEver
관리 메뉴

Blue Breeze

php codeignier3 framework helloWorld 본문

Language/PHP

php codeignier3 framework helloWorld

푸른바람 C/H 2018.06.11 08:00

Codeigniter3

composer require "codeigniter/framework=*"
cp vendor/codeigniter/framework/index.php . 
cp -r vendor/codeigniter/framework/application/ .
vi index.php
vi application/controllers/Welcome.php
$system_path = 'vendor/codeigniter/framework/system/';
<?php
    defined('BASEPATH') OR exit('No direct script access allowed');
    
    class Welcome extends CI_Controller {
        public function index()
        {
            echo "Hello World";
        }
    }
php -S localhost:1337

# other shell
ab -n 10000 -c 10 -k http://127.0.0.1:1337/
...
Concurrency Level:      10
Time taken for tests:   6.287 seconds
Complete requests:      10000
Failed requests:        0
Keep-Alive requests:    0
Total transferred:      1920000 bytes
HTML transferred:       110000 bytes
Requests per second:    1590.58 [#/sec] (mean)
Time per request:       6.287 [ms] (mean)
Time per request:       0.629 [ms] (mean, across all concurrent requests)
Transfer rate:          298.23 [Kbytes/sec] received

Connection Times (ms)
                min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     5    6   1.4      6      47
Waiting:        5    6   1.4      6      47
Total:          5    6   1.4      6      47

Percentage of the requests served within a certain time (ms)
    50%      6
    66%      6
    75%      7
    80%      7
    90%      7
    95%      8
    98%      8
    99%      8
    100%     47 (longest request)


0 Comments
댓글쓰기 폼