1、Apache\conf\httpd.conf去掉 #Include config/extra/httpd-vhosts.conf 前面的#2、Apache\conf\extra\httpd-vhosts.conf把 ServerAdmin webmaster@dummy-host.example...
分类:
Web程序 时间:
2014-11-19 00:12:25
阅读次数:
170
MySQL查询in操作 查询结果按in集合顺序显示_Mysql_脚本之家MySQL 查询in操作,查询结果按in集合顺序显示 复制代码 代码如下:select * from test where id in(3,1,5) order by find_in_set(id,'3,1,5'); selec...
分类:
数据库 时间:
2014-11-19 00:02:12
阅读次数:
286
第一步、添加PHPMailer类库将下载后的文件解压,将PHPMail目录移动至ThinkPHP目录中的Vendor内。(请确保class.phpmailer.php文件就在ThinkPHP\Vendor\PHPMailer\class.phpmailer.php)第二步、添加发送邮件函数在项目目录...
分类:
Web程序 时间:
2014-11-18 23:25:34
阅读次数:
179
$Data = M('Data'); // 实例化Data数据对象 import('ORG.Util.Page');// 导入分页类 $count = $Data->where($map)->count();// 查询满足要求的总记录数 ...
分类:
Web程序 时间:
2014-11-18 23:19:29
阅读次数:
187
题目大意:给出一段序列,求一个区间内的逆序对数量.
思路:又是没有修改的查询操作,又可以搞莫队了(莫队真好搞..
先把所有的询问排序,然后从头到位进行转移,记一个全局的答案,然后每次转移的时候记录逆序对的改变情况.然后从ans数组中输出..
CODE:
#include
#include
#include
#include
#include
#define...
分类:
编程语言 时间:
2014-11-18 16:02:14
阅读次数:
212
比如页面都要引入header头部但是header头部里面用到了模板引擎,这个引擎在测试的时候并没有实现效果就写一个控制器display header通过地址栏就可以找到一个单一的header页面了,这个页面里引擎是可用的引用它的时候就用u方法就好了总结:在thinkphp里,只有通过控制器渲染的模板...
分类:
其他好文 时间:
2014-11-18 10:20:21
阅读次数:
115
第一种方法:数据库中包含有自动增长字段ID,则ID作为where条件5,'username'=>'王美人','email'=>'meiren@163.com');//$data中包含有自动增长字段uid $res = $user->save($data);//调用Model下的save()函数进行....
分类:
数据库 时间:
2014-11-17 20:57:14
阅读次数:
360
show(' :)欢迎使用 ThinkPHP!','utf-8'); $this->display();}function addinfo(){ $M=M("admin"); $data=$_POST; $data['in_date']=time(); $q=$M->add($data); echo...
分类:
其他好文 时间:
2014-11-17 20:56:00
阅读次数:
180
ThinkPHP框架- 是一套开源的MVC结构的开源PHP框架,但是没有见过可以用来做单元测试的模块。直接使用phpunit会遇到很多框架访问的问题。在使用sea平台开发的过程中,不能使用命令行运行phpunit运行测试用例。 ...
分类:
其他好文 时间:
2014-11-17 16:02:23
阅读次数:
188
1.这是我在做项目的时候编写的:$profit = M('shipping_types',' ','DB_PROFIT');//没有表前缀,在M函数的第二个参数就为空。//条件$field = array();$field += array('id' => 'id');$field += array...
分类:
Web程序 时间:
2014-11-17 15:29:37
阅读次数:
158