thinkphp随机排序
->orderRaw("rand()")
->orderRaw("rand()")
一对多关联 关联定义 一对多关联的情况也比较常见,使用hasMany方法定义,参数包括: hasMany('关联模型名','外键名','主键名',['模型别名定义']); 例如一篇文章可以有多个评论 …
打开php.ini,搜索disable_functions,代码如下: disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status, ini_alter,ini_alter,ini_restore,dl,pfsockopen,…
/所有查询必须 use/think/Db; /* 1 配置数据库 * 2 使用DB 命名空间 * */ &…
在common.php中 define("wx_appid","123456"); 在其他文件直接 wx_appid就可以使用