/**
*获取当前URL不含QUERY_STRING
*@accesspublic
*@paramstring$urlURL地址
*@returnstring
*/
publicfunctionbaseUrl($url=null)
{
if(!is_null($url)&&true!==$url){
$this->baseUrl=$url;
return$this;
}elseif(!$this->baseUrl){
$str=$this->url();
$t..
分类:
Web程序 时间:
2017-01-05 12:22:33
阅读次数:
263
注意: 1.$where 的初始条件为 $where = [] $where = 1 报错:Illegal string offset 'name' 2.查询数组两种写法,都可以 $where['name'] = ['like','%'.$keyword.'%']; $where['name']=a ...
分类:
Web程序 时间:
2017-01-03 18:58:23
阅读次数:
291
/**
*获取输入
*@returnnull|string
*/
publicfunctiongetInput()
{
return$this->input;
}//获取输入信息
/**
*设置输入
*@parammixed$input
*@returnself
*/
publicfunctionsetInput($input)
{
if($this->isRunning()){
thrownew\LogicException(‘Inputcannotbesetwhi..
分类:
Web程序 时间:
2016-12-28 13:05:16
阅读次数:
282
/**
*开启从底层过程获取输出和错误输出。
*@returnProcess
*@throws\RuntimeException
*/
publicfunctionenableOutput()
{//enableOutput
if($this->isRunning()){//如果运行
thrownew\RuntimeException(‘Enablingoutputwhiletheprocessisrunningisnotpossible.‘);
}
$thi..
分类:
Web程序 时间:
2016-12-26 14:21:04
阅读次数:
233
/**
*获取PID
*@returnint|null
*@throws\RuntimeException
*/
publicfunctiongetPid()
{//获取进程ID
if($this->isSigchildEnabled()){
thrownew\RuntimeException(‘ThisPHPhasbeencompiledwith--enable-sigchild.Theprocessidentifiercannotberetrieved.‘);
}//如果是单独..
分类:
Web程序 时间:
2016-12-23 10:07:47
阅读次数:
194
最近在准备新项目的一些环境,开发环境 改用了mongodb 作为主要数据库,并且php框架改为ThinkPHP5.0.后台管理系统也要改。 首先来总结下自己在配置环境时候遇到的问题。 一、mongodb的安装: 1.去官网下咋对应的mongodb版本 我用的是2008R2bit64位的:https: ...
分类:
其他好文 时间:
2016-12-23 01:07:04
阅读次数:
210
/**
*@vararray
*/
publicstatic$exitCodes=[//异常退出代码
0=>‘OK‘,//正常退出
1=>‘Generalerror‘,//一般性错误
2=>‘Misuseofshellbuiltins‘,//缺少脚本
126=>‘Invokedcommandcannotexecute‘,//执行命令错误
127=>‘Commandnotfound‘,//命令没找到
128=>‘In..
分类:
Web程序 时间:
2016-12-21 12:05:16
阅读次数:
230
1.普通关键词搜索框 模板部分代码: <form name='searchform' action='/index.php/module/controller/search' method='get'> <input name='keyword' type='text' value='<?php e ...
分类:
Web程序 时间:
2016-12-20 13:55:26
阅读次数:
232
<?php
//+----------------------------------------------------------------------
//|ThinkPHP[WECANDOITJUSTTHINK]
//+----------------------------------------------------------------------
//|Copyright(c)2006~2015http://thinkphp.cnAllrightsreserved.
//+----..
分类:
Web程序 时间:
2016-12-20 12:06:21
阅读次数:
247
<?php
//+----------------------------------------------------------------------
//|ThinkPHP[WECANDOITJUSTTHINK]
//+----------------------------------------------------------------------
//|Copyright(c)2006~2016http://thinkphp.cnAllrightsreserved.
//+----..
分类:
Web程序 时间:
2016-12-16 12:23:55
阅读次数:
263