最近做个东西,说急用就先用php+easyui搭了,现在基本搞完第一版,并发的时候貌似效果不好,后台部分是自个写的mvc结构,
数据库方式是即连即关的,不懂瓶颈是不是在这里。于是,又不想自己搞什么数据库连接池。
于是,想把代码搬到CI框架上。
今天是第一天,mark几条如下
1. 修改数据库连接配置在 application\config\database.php
2.application\config\autoload.php 可以配置自动加载的系统辅助类,如session,email等;
3.网站访问url默认为:http://site.com/index.php/controller_name/function_name/parameter
如果想去掉中间的index.php,需要启用并配置.htaccess如下:
RewriteEngine on
RewriteCond $1 !^(index\.php|test\.php|index\.html|robots\.txt|data_back|bbs|ucenter|api|uc_client|templates|public|cache|templates_c|config|upload|html)
RewriteRule ^(.*)$ index.php/$1 [L]
4.helpers文件夹内可以自定义辅助函数;
5.libraries文件夹内可以自定义非mvc的类;(就是还不懂怎么使用db)