├── LICENSE ├── README.md ├── ab_batch.txt ├── application ├── .htaccess ├── cache │ ├── .htaccess │ └── index.html ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── index.html │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ ├── admin │ │ └── main.php │ ├── help.php │ ├── index.html │ ├── myct.php │ ├── test.php │ └── welcome.php ├── core │ ├── MY_Controller.php │ └── index.html ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html ├── helpers │ ├── common_helper.php │ └── index.html ├── hooks │ ├── index.html │ └── testhook.php ├── index.html ├── language │ ├── english │ │ └── index.html │ └── index.html ├── libraries │ ├── Cookie.php │ ├── My_Session.php │ ├── RandomKey.php │ ├── cache │ │ └── FileCache.php │ └── index.html ├── logs │ └── index.html ├── models │ ├── index.html │ └── testmodel.php ├── third_party │ └── index.html └── views │ ├── admin │ └── main.php │ ├── dbtest.php │ ├── index.html │ ├── phpinfo.php │ └── welcome_message.php ├── ciswoole.conf ├── contrast_db.jpg ├── contrast_page.jpg ├── httpindex.php ├── index.php ├── server ├── error_php.php ├── http_server.php └── test.php ├── static ├── css │ └── welcome.css └── images │ └── ci_main.jpg └── system ├── .htaccess ├── core ├── Benchmark.php ├── CodeIgniter.php ├── Common.php ├── Config.php ├── Controller.php ├── Exceptions.php ├── Hooks.php ├── Input.php ├── Lang.php ├── Loader.php ├── Model.php ├── Output.php ├── Router.php ├── Security.php ├── URI.php ├── Utf8.php └── index.html ├── database ├── DB.php ├── DB_active_rec.php ├── DB_cache.php ├── DB_driver.php ├── DB_forge.php ├── DB_result.php ├── DB_utility.php ├── drivers │ ├── cubrid │ │ ├── cubrid_driver.php │ │ ├── cubrid_forge.php │ │ ├── cubrid_result.php │ │ ├── cubrid_utility.php │ │ └── index.html │ ├── index.html │ ├── mssql │ │ ├── index.html │ │ ├── mssql_driver.php │ │ ├── mssql_forge.php │ │ ├── mssql_result.php │ │ └── mssql_utility.php │ ├── mysql │ │ ├── index.html │ │ ├── mysql_driver.php │ │ ├── mysql_forge.php │ │ ├── mysql_result.php │ │ └── mysql_utility.php │ ├── mysqli │ │ ├── index.html │ │ ├── mysqli_driver.php │ │ ├── mysqli_forge.php │ │ ├── mysqli_result.php │ │ └── mysqli_utility.php │ ├── oci8 │ │ ├── index.html │ │ ├── oci8_driver.php │ │ ├── oci8_forge.php │ │ ├── oci8_result.php │ │ └── oci8_utility.php │ ├── odbc │ │ ├── index.html │ │ ├── odbc_driver.php │ │ ├── odbc_forge.php │ │ ├── odbc_result.php │ │ └── odbc_utility.php │ ├── pdo │ │ ├── index.html │ │ ├── pdo_driver.php │ │ ├── pdo_forge.php │ │ ├── pdo_result.php │ │ └── pdo_utility.php │ ├── postgre │ │ ├── index.html │ │ ├── postgre_driver.php │ │ ├── postgre_forge.php │ │ ├── postgre_result.php │ │ └── postgre_utility.php │ ├── sqlite │ │ ├── index.html │ │ ├── sqlite_driver.php │ │ ├── sqlite_forge.php │ │ ├── sqlite_result.php │ │ └── sqlite_utility.php │ └── sqlsrv │ │ ├── index.html │ │ ├── sqlsrv_driver.php │ │ ├── sqlsrv_forge.php │ │ ├── sqlsrv_result.php │ │ └── sqlsrv_utility.php └── index.html ├── fonts ├── index.html └── texb.ttf ├── helpers ├── array_helper.php ├── captcha_helper.php ├── cookie_helper.php ├── date_helper.php ├── directory_helper.php ├── download_helper.php ├── email_helper.php ├── file_helper.php ├── form_helper.php ├── html_helper.php ├── index.html ├── inflector_helper.php ├── language_helper.php ├── number_helper.php ├── path_helper.php ├── security_helper.php ├── smiley_helper.php ├── string_helper.php ├── text_helper.php ├── typography_helper.php ├── url_helper.php └── xml_helper.php ├── index.html ├── language ├── english │ ├── calendar_lang.php │ ├── date_lang.php │ ├── db_lang.php │ ├── email_lang.php │ ├── form_validation_lang.php │ ├── ftp_lang.php │ ├── imglib_lang.php │ ├── index.html │ ├── migration_lang.php │ ├── number_lang.php │ ├── profiler_lang.php │ ├── unit_test_lang.php │ └── upload_lang.php └── index.html └── libraries ├── Cache ├── Cache.php ├── drivers │ ├── Cache_apc.php │ ├── Cache_dummy.php │ ├── Cache_file.php │ ├── Cache_memcached.php │ └── index.html └── index.html ├── Calendar.php ├── Cart.php ├── Driver.php ├── Email.php ├── Encrypt.php ├── Form_validation.php ├── Ftp.php ├── Image_lib.php ├── Javascript.php ├── Log.php ├── Migration.php ├── Pagination.php ├── Parser.php ├── Profiler.php ├── Session.php ├── Sha1.php ├── Table.php ├── Trackback.php ├── Typography.php ├── Unit_test.php ├── Upload.php ├── User_agent.php ├── Xmlrpc.php ├── Xmlrpcs.php ├── Zip.php ├── index.html └── javascript ├── Jquery.php └── index.html /README.md: -------------------------------------------------------------------------------- 1 | 2 | ciswoole 3 | ======== 4 | 5 | CodeIgniter 2.2 with Swoole Http_Server 6 | ## Requirements 7 | 8 | * PHP 5.3+ 9 | * Swoole 1.7.16 10 | * Linux, OS X and basic Windows support (Thinks to cygwin) 11 | 12 | ## Installation Swoole 13 | 14 | 1. Install via pecl 15 | 16 | ``` 17 | pecl install swoole 18 | ``` 19 | 20 | 2. Install from source 21 | 22 | ``` 23 | sudo apt-get install php5-dev 24 | git clone https://github.com/swoole/swoole-src.git 25 | cd swoole-src 26 | phpize 27 | ./configure 28 | make && make install 29 | ``` 30 | 31 | ## How to run 32 | 33 | 1. cd ciswoole/server 34 | 2. php http_server.php 35 | 3. Open your browser and enter http://ip:9501 36 | 37 | ## Comparison test 38 | 39 | 1. This is the home page comparison test 40 |  41 | 2. This is a data query comparison test 42 |  43 | 44 | ## batch test 45 | 46 | 1. See document file ab_batch.txt 47 | -------------------------------------------------------------------------------- /ab_batch.txt: -------------------------------------------------------------------------------- 1 | 压侧对同一个数据库,数据表进行读取操作 2 | 测试在虚拟机下进行导致QPS两个都很低,主要是比较两种框架在相同模式下性能差别 3 | 第一个是ciswoole,后面的是CodeIgniter 2.2 4 | 5 | [xmc@localhost ciswoole]$ ab -c500 -n5000 -k http://192.168.1.10:9501/welcome/dbtest 6 | This is ApacheBench, Version 2.3 <$Revision: 1604373 $> 7 | Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 8 | Licensed to The Apache Software Foundation, http://www.apache.org/ 9 | 10 | Benchmarking 192.168.1.10 (be patient) 11 | Completed 500 requests 12 | Completed 1000 requests 13 | Completed 1500 requests 14 | Completed 2000 requests 15 | Completed 2500 requests 16 | Completed 3000 requests 17 | Completed 3500 requests 18 | Completed 4000 requests 19 | Completed 4500 requests 20 | Completed 5000 requests 21 | Finished 5000 requests 22 | 23 | 24 | Server Software: swoole-http-server 25 | Server Hostname: 192.168.1.10 26 | Server Port: 9501 27 | 28 | Document Path: /welcome/dbtest 29 | Document Length: 1756 bytes 30 | 31 | Concurrency Level: 500 32 | Time taken for tests: 6.077 seconds 33 | Complete requests: 5000 34 | Failed requests: 0 35 | Keep-Alive requests: 5000 36 | Total transferred: 9625000 bytes 37 | HTML transferred: 8780000 bytes 38 | Requests per second: 822.73 [#/sec] (mean) 39 | Time per request: 607.729 [ms] (mean) 40 | Time per request: 1.215 [ms] (mean, across all concurrent requests) 41 | Transfer rate: 1546.65 [Kbytes/sec] received 42 | 43 | Connection Times (ms) 44 | min mean[+/-sd] median max 45 | Connect: 0 2 6.2 0 28 46 | Processing: 54 575 128.3 589 896 47 | Waiting: 54 575 128.3 589 896 48 | Total: 81 577 124.6 589 896 49 | 50 | Percentage of the requests served within a certain time (ms) 51 | 50% 589 52 | 66% 624 53 | 75% 647 54 | 80% 666 55 | 90% 721 56 | 95% 761 57 | 98% 818 58 | 99% 843 59 | 100% 896 (longest request) 60 | 61 | 62 | [xmc@localhost ciswoole]$ ab -c500 -n 5000 -k http://ci22.iizhu.com/welcome/dbtest 63 | This is ApacheBench, Version 2.3 <$Revision: 1604373 $> 64 | Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 65 | Licensed to The Apache Software Foundation, http://www.apache.org/ 66 | 67 | Benchmarking ci22.iizhu.com (be patient) 68 | Completed 500 requests 69 | Completed 1000 requests 70 | Completed 1500 requests 71 | Completed 2000 requests 72 | Completed 2500 requests 73 | Completed 3000 requests 74 | Completed 3500 requests 75 | Completed 4000 requests 76 | Completed 4500 requests 77 | Completed 5000 requests 78 | Finished 5000 requests 79 | 80 | 81 | Server Software: nginx/1.6.2 82 | Server Hostname: ci22.iizhu.com 83 | Server Port: 80 84 | 85 | Document Path: /welcome/dbtest 86 | Document Length: 1756 bytes 87 | 88 | Concurrency Level: 500 89 | Time taken for tests: 35.462 seconds 90 | Complete requests: 5000 91 | Failed requests: 313 92 | (Connect: 0, Receive: 0, Length: 313, Exceptions: 0) 93 | Non-2xx responses: 313 94 | Keep-Alive requests: 313 95 | Total transferred: 9087643 bytes 96 | HTML transferred: 8284208 bytes 97 | Requests per second: 140.99 [#/sec] (mean) 98 | Time per request: 3546.239 [ms] (mean) 99 | Time per request: 7.092 [ms] (mean, across all concurrent requests) 100 | Transfer rate: 250.26 [Kbytes/sec] received 101 | 102 | Connection Times (ms) 103 | min mean[+/-sd] median max 104 | Connect: 0 3 8.2 0 32 105 | Processing: 126 2906 4831.2 1116 29236 106 | Waiting: 126 2906 4831.2 1116 29236 107 | Total: 154 2909 4835.0 1116 29262 108 | 109 | Percentage of the requests served within a certain time (ms) 110 | 50% 1116 111 | 66% 2011 112 | 75% 2090 113 | 80% 2173 114 | 90% 5457 115 | 95% 13938 116 | 98% 26615 117 | 99% 26700 118 | 100% 29262 (longest request) 119 | 120 | 结论:ciswoole的qps达到822.73 [#/sec] (mean) 而使用nginx+php-fpm的qps只达到140.99 [#/sec] (mean) 121 | 不难的出,ciswoole效率比ci+nginx+php-fpm强五倍 -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |Directory access is forbidden.
8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/autoload.php: -------------------------------------------------------------------------------- 1 | '', 5 | 'xhtml1-strict' => '', 6 | 'xhtml1-trans' => '', 7 | 'xhtml1-frame' => '', 8 | 'html5' => '', 9 | 'html4-strict' => '', 10 | 'html4-trans' => '', 11 | 'html4-frame' => '' 12 | ); 13 | 14 | /* End of file doctypes.php */ 15 | /* Location: ./application/config/doctypes.php */ -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 12 | '/ö|œ/' => 'oe', 13 | '/ü/' => 'ue', 14 | '/Ä/' => 'Ae', 15 | '/Ü/' => 'Ue', 16 | '/Ö/' => 'Oe', 17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', 18 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', 19 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', 20 | '/ç|ć|ĉ|ċ|č/' => 'c', 21 | '/Ð|Ď|Đ/' => 'D', 22 | '/ð|ď|đ/' => 'd', 23 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E', 24 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e', 25 | '/Ĝ|Ğ|Ġ|Ģ/' => 'G', 26 | '/ĝ|ğ|ġ|ģ/' => 'g', 27 | '/Ĥ|Ħ/' => 'H', 28 | '/ĥ|ħ/' => 'h', 29 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I', 30 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i', 31 | '/Ĵ/' => 'J', 32 | '/ĵ/' => 'j', 33 | '/Ķ/' => 'K', 34 | '/ķ/' => 'k', 35 | '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L', 36 | '/ĺ|ļ|ľ|ŀ|ł/' => 'l', 37 | '/Ñ|Ń|Ņ|Ň/' => 'N', 38 | '/ñ|ń|ņ|ň|ʼn/' => 'n', 39 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O', 40 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o', 41 | '/Ŕ|Ŗ|Ř/' => 'R', 42 | '/ŕ|ŗ|ř/' => 'r', 43 | '/Ś|Ŝ|Ş|Š/' => 'S', 44 | '/ś|ŝ|ş|š|ſ/' => 's', 45 | '/Ţ|Ť|Ŧ/' => 'T', 46 | '/ţ|ť|ŧ/' => 't', 47 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U', 48 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u', 49 | '/Ý|Ÿ|Ŷ/' => 'Y', 50 | '/ý|ÿ|ŷ/' => 'y', 51 | '/Ŵ/' => 'W', 52 | '/ŵ/' => 'w', 53 | '/Ź|Ż|Ž/' => 'Z', 54 | '/ź|ż|ž/' => 'z', 55 | '/Æ|Ǽ/' => 'AE', 56 | '/ß/'=> 'ss', 57 | '/IJ/' => 'IJ', 58 | '/ij/' => 'ij', 59 | '/Œ/' => 'OE', 60 | '/ƒ/' => 'f' 61 | ); 62 | 63 | /* End of file foreign_chars.php */ 64 | /* Location: ./application/config/foreign_chars.php */ -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 'testhook', 15 | 'function' => 'test', 16 | 'filename' => 'testhook.php', 17 | 'filepath' => 'hooks' 18 | ); 19 | 20 | $hook['pre_controller'][] = array( 21 | 'class' => 'testhook', 22 | 'function' => 'test1', 23 | 'filename' => 'testhook.php', 24 | 'filepath' => 'hooks' 25 | ); 26 | 27 | /* End of file hooks.php */ 28 | /* Location: ./application/config/hooks.php */ -------------------------------------------------------------------------------- /application/config/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |Directory access is forbidden.
8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/migration.php: -------------------------------------------------------------------------------- 1 | migration->latest() this is the version that schema will 21 | | be upgraded / downgraded to. 22 | | 23 | */ 24 | $config['migration_version'] = 0; 25 | 26 | 27 | /* 28 | |-------------------------------------------------------------------------- 29 | | Migrations Path 30 | |-------------------------------------------------------------------------- 31 | | 32 | | Path to your migrations folder. 33 | | Typically, it will be within your application path. 34 | | Also, writing permission is required within the migrations path. 35 | | 36 | */ 37 | $config['migration_path'] = APPPATH . 'migrations/'; 38 | 39 | 40 | /* End of file migration.php */ 41 | /* Location: ./application/config/migration.php */ -------------------------------------------------------------------------------- /application/config/mimes.php: -------------------------------------------------------------------------------- 1 | 'application/mac-binhex40', 12 | 'cpt' => 'application/mac-compactpro', 13 | 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'), 14 | 'bin' => 'application/macbinary', 15 | 'dms' => 'application/octet-stream', 16 | 'lha' => 'application/octet-stream', 17 | 'lzh' => 'application/octet-stream', 18 | 'exe' => array('application/octet-stream', 'application/x-msdownload'), 19 | 'class' => 'application/octet-stream', 20 | 'psd' => 'application/x-photoshop', 21 | 'so' => 'application/octet-stream', 22 | 'sea' => 'application/octet-stream', 23 | 'dll' => 'application/octet-stream', 24 | 'oda' => 'application/oda', 25 | 'pdf' => array('application/pdf', 'application/x-download'), 26 | 'ai' => 'application/postscript', 27 | 'eps' => 'application/postscript', 28 | 'ps' => 'application/postscript', 29 | 'smi' => 'application/smil', 30 | 'smil' => 'application/smil', 31 | 'mif' => 'application/vnd.mif', 32 | 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'), 33 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'), 34 | 'wbxml' => 'application/wbxml', 35 | 'wmlc' => 'application/wmlc', 36 | 'dcr' => 'application/x-director', 37 | 'dir' => 'application/x-director', 38 | 'dxr' => 'application/x-director', 39 | 'dvi' => 'application/x-dvi', 40 | 'gtar' => 'application/x-gtar', 41 | 'gz' => 'application/x-gzip', 42 | 'php' => 'application/x-httpd-php', 43 | 'php4' => 'application/x-httpd-php', 44 | 'php3' => 'application/x-httpd-php', 45 | 'phtml' => 'application/x-httpd-php', 46 | 'phps' => 'application/x-httpd-php-source', 47 | 'js' => 'application/x-javascript', 48 | 'swf' => 'application/x-shockwave-flash', 49 | 'sit' => 'application/x-stuffit', 50 | 'tar' => 'application/x-tar', 51 | 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), 52 | 'xhtml' => 'application/xhtml+xml', 53 | 'xht' => 'application/xhtml+xml', 54 | 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'), 55 | 'mid' => 'audio/midi', 56 | 'midi' => 'audio/midi', 57 | 'mpga' => 'audio/mpeg', 58 | 'mp2' => 'audio/mpeg', 59 | 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), 60 | 'aif' => 'audio/x-aiff', 61 | 'aiff' => 'audio/x-aiff', 62 | 'aifc' => 'audio/x-aiff', 63 | 'ram' => 'audio/x-pn-realaudio', 64 | 'rm' => 'audio/x-pn-realaudio', 65 | 'rpm' => 'audio/x-pn-realaudio-plugin', 66 | 'ra' => 'audio/x-realaudio', 67 | 'rv' => 'video/vnd.rn-realvideo', 68 | 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), 69 | 'bmp' => array('image/bmp', 'image/x-windows-bmp'), 70 | 'gif' => 'image/gif', 71 | 'jpeg' => array('image/jpeg', 'image/pjpeg'), 72 | 'jpg' => array('image/jpeg', 'image/pjpeg'), 73 | 'jpe' => array('image/jpeg', 'image/pjpeg'), 74 | 'png' => array('image/png', 'image/x-png'), 75 | 'tiff' => 'image/tiff', 76 | 'tif' => 'image/tiff', 77 | 'css' => 'text/css', 78 | 'html' => 'text/html', 79 | 'htm' => 'text/html', 80 | 'shtml' => 'text/html', 81 | 'txt' => 'text/plain', 82 | 'text' => 'text/plain', 83 | 'log' => array('text/plain', 'text/x-log'), 84 | 'rtx' => 'text/richtext', 85 | 'rtf' => 'text/rtf', 86 | 'xml' => 'text/xml', 87 | 'xsl' => 'text/xml', 88 | 'mpeg' => 'video/mpeg', 89 | 'mpg' => 'video/mpeg', 90 | 'mpe' => 'video/mpeg', 91 | 'qt' => 'video/quicktime', 92 | 'mov' => 'video/quicktime', 93 | 'avi' => 'video/x-msvideo', 94 | 'movie' => 'video/x-sgi-movie', 95 | 'doc' => 'application/msword', 96 | 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'), 97 | 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'), 98 | 'word' => array('application/msword', 'application/octet-stream'), 99 | 'xl' => 'application/excel', 100 | 'eml' => 'message/rfc822', 101 | 'json' => array('application/json', 'text/json') 102 | ); 103 | 104 | 105 | /* End of file mimes.php */ 106 | /* Location: ./application/config/mimes.php */ 107 | -------------------------------------------------------------------------------- /application/config/profiler.php: -------------------------------------------------------------------------------- 1 | array('grin.gif', '19', '19', 'grin'), 20 | ':lol:' => array('lol.gif', '19', '19', 'LOL'), 21 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), 22 | ':)' => array('smile.gif', '19', '19', 'smile'), 23 | ';-)' => array('wink.gif', '19', '19', 'wink'), 24 | ';)' => array('wink.gif', '19', '19', 'wink'), 25 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), 26 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), 27 | ':-S' => array('confused.gif', '19', '19', 'confused'), 28 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'), 29 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), 30 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), 31 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), 32 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), 33 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'), 34 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'), 35 | ':long:' => array('longface.gif', '19', '19', 'long face'), 36 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), 37 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), 38 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), 39 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), 40 | ':down:' => array('downer.gif', '19', '19', 'downer'), 41 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'), 42 | ':sick:' => array('sick.gif', '19', '19', 'sick'), 43 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), 44 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'), 45 | '>:(' => array('mad.gif', '19', '19', 'mad'), 46 | ':mad:' => array('mad.gif', '19', '19', 'mad'), 47 | '>:-(' => array('angry.gif', '19', '19', 'angry'), 48 | ':angry:' => array('angry.gif', '19', '19', 'angry'), 49 | ':zip:' => array('zip.gif', '19', '19', 'zipper'), 50 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), 51 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'), 52 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), 53 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), 54 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), 55 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), 56 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), 57 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), 58 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), 59 | ':snake:' => array('snake.gif', '19', '19', 'snake'), 60 | ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), 61 | ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item 62 | 63 | ); 64 | 65 | /* End of file smileys.php */ 66 | /* Location: ./application/config/smileys.php */ -------------------------------------------------------------------------------- /application/controllers/admin/main.php: -------------------------------------------------------------------------------- 1 | admin:ciswoole"; 8 | $this->load->view('admin/main'); 9 | } 10 | } 11 | 12 | /* End of file main.php */ 13 | /* Location: ./application/controllers/main.php */ -------------------------------------------------------------------------------- /application/controllers/help.php: -------------------------------------------------------------------------------- 1 | load->helper('common'); 8 | } 9 | 10 | public function index($id) { 11 | if (checkId($id)) { 12 | echo 'id='.$id; 13 | } else { 14 | echo 'value='.$id.', isn\'t id'; 15 | } 16 | } 17 | } 18 | 19 | /* End of file help.php */ 20 | /* Location: ./application/controllers/help.php */ -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |Directory access is forbidden.
8 | 9 | 10 | -------------------------------------------------------------------------------- /application/controllers/myct.php: -------------------------------------------------------------------------------- 1 | 'ciswoole','version'=>'1.0'); 20 | $this->format($version); 21 | } 22 | } 23 | 24 | /* End of file myct.php */ 25 | /* Location: ./application/controllers/myct.php */ -------------------------------------------------------------------------------- /application/controllers/test.php: -------------------------------------------------------------------------------- 1 | 18 | * @see http://codeigniter.com/user_guide/general/urls.html 19 | */ 20 | public function __construct() { 21 | parent::__construct(); 22 | $this->load->library('My_Session'); 23 | $this->mysession = new My_Session(); 24 | $this->mysession->start(); 25 | } 26 | public function index() { 27 | show_error('a php error' , 500 , 'An Error Was Encountered'); 28 | } 29 | public function test_echo() { 30 | echo 'im test echo'; 31 | } 32 | public function set_session() { 33 | $_SESSION['name'] = 'xmc'; 34 | var_dump($_SESSION); 35 | $this->mysession->save(); 36 | } 37 | public function get_session() { 38 | // $_SESSION['name'] = 'xmc'; 39 | var_dump($_SESSION['name']); 40 | } 41 | 42 | } 43 | 44 | /* End of file test.php */ 45 | /* Location: ./application/controllers/test.php */ -------------------------------------------------------------------------------- /application/controllers/welcome.php: -------------------------------------------------------------------------------- 1 | 18 | * @see http://codeigniter.com/user_guide/general/urls.html 19 | */ 20 | public function index() { 21 | $this->load->view('welcome_message'); 22 | } 23 | public function test() { 24 | $data = array('email'=>'smalleyes@live.cn','tel'=>'123456789'); 25 | $this->load->view('phpinfo',$data); 26 | } 27 | public function dbtest() { 28 | $this->load->model('testmodel'); 29 | $res = $this->testmodel->get_last_ten(); 30 | $data['res'] = $res; 31 | $this->load->view('dbtest',$data); 32 | } 33 | public function tiaoz() { 34 | $this->load->helper("url"); 35 | redirect("welcome/test"); 36 | } 37 | } 38 | 39 | /* End of file welcome.php */ 40 | /* Location: ./application/controllers/welcome.php */ -------------------------------------------------------------------------------- /application/core/MY_Controller.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |Directory access is forbidden.
8 | 9 | 10 |