-
路徑后面要加“/”
查看全部 -
四種URL模式?
0.普通模式http://localhost/php/test1/index.php?m=Index&a=user&id=1
1.PATHINFO模式 http://localhost/php/test1/index.php/Index/user/id/1.html
2.重寫模式 http://localhost/test1/Index/index/id/1.html?
3.兼容模式 http://localhost/test1/index.php?s=/Index/index/id/1.html?
建議使用PATHINFO模式
U方法
echo U('模塊/方法 例Index/user',array('id'=>1),'后綴名 例xml',是否直接跳轉(zhuǎn)false,子域名'localhost');
.$_GET['id'].獲取id的值
查看全部 -
1、大寫的C方法就是config縮寫 C('name');
2、開啟dubug define('APP_DEBUG',TRUE);在項目上線后關(guān)閉,并刪除runtime文件夾
3、加載自定義配置文件user.php,就是在conf文件夾的config.php里面引入’LOAD_EXT_CONFIG‘=>’user‘,并且自定義配置文件不是被項目定義,每次都會加載,建議不要自定義配置文件
4. 運行是在lib/action里面
查看全部 -
框架
查看全部 -
MVC模式
查看全部 -
mvc
查看全部 -
用wiznote來做筆記,時刻記錄的習(xí)慣要保持下去。
查看全部 -
desc 降序排列? asc 升序排列
查看全部 -
混合用法
$where['id']=aaray('gt',10);
$where['_string']='score>10';
查看全部 -
$where['id']=array(array('gt',10),array('lt',3));默認(rèn)是且的關(guān)系
$where['id']=array(array('gt',10),array('lt',3),'or');后面加個or就改成或的關(guān)系
查看全部 -
distinct() 過濾掉重復(fù)的字段內(nèi)容? ? distinct(true)
查看全部 -
group()? 把字段弄成一組!
查看全部 -
having()? 限制
查看全部 -
取出一部分字段的? 可以用 field() 方法
查看全部 -
變量名 = array(
????????1=>array(
????????);
? ? ? ? 2=>array(
????????);
)
查看全部
舉報