热门 最新 精选 话题 上榜
* autoload.php<?php/** * Created by PhpStorm. * User: EDZ * Date: 2020/6/22 * Time: 11:01 */$prefixList = [ 'DesignPatterns\\Structural\\Adaptor'];foreach ($prefixList as $prefix) { // clazz "DesignPatterns\Structural\Adaptor\Book"
原创 2021-08-13 01:02:11
117阅读
raw expression private function listCustomerIds() { // SELECT customer_id,name,count(1) as c from contact group by customer_id,name HAVING c>1; /** @var $db \Illuminate\Database\Connection */ $db = $this->tblCustomer-&gt
原创 2021-08-13 01:02:10
242阅读
const BUFSIZE = 1024; const SHARE_IMG = "share_logo.jpg"; public function download($src) { $url = parse_url($src); $host = $url['host']; $protocol = $url['scheme']; // http, https $uri = $url['path']; ...
原创 2021-08-13 01:02:08
90阅读
混杂模式 $where = []; array_push($where, 'create_user_id=4 or create_user_id=17'); array_push($where, 'province like "山%"'); $where['city'] = array('=', '济南'); ...
原创 2021-08-13 01:01:54
411阅读
application/config.php // 'db_config1' => 'mysql://mingzhanghui:test111@192.168.1.181:3306/ETARM#utf8', // 'db_config2' => 'mysql://mingzhanghui:test111&^@192.168.1.181:3306/ETBD...
原创 2021-08-13 01:01:52
1381阅读
https://www.kancloud.cn/manual/thinkphp5/138669改了类型还是不起作用这个字段在mysql中定义的是date类型查看Model.php文件 thinkphp/library/think/Model.php走到else报错的, 是数据类型错误的问题application/index/model/Contract.ph...
原创 2021-08-13 01:01:50
589阅读
$proxy->type 得到的结果是 []空数组JdProxy.phpnamespace app\crm\model;use think\Model;// use app\admin\model\Common as BaseModel;class JdProxy extends Model { protected $table = '5kcrm_crm...
原创 2021-08-13 01:01:49
370阅读
* 项目地址:https://gitee.com/wukongcrm/72crm* 数据库结构:** 权限规则表CREATE TABLE `5kcrm_admin_rule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `types` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0系统设...
原创 2021-08-13 01:01:47
202阅读
thinkphp3 执行原生sqlM()->query($sql);thinkphp5执行原生sqluse think\Db;Db:query($sql, [$param, ...]);Db::execute($sql, [$param, ...]);Thinkphp3 public function coupon_list() { $li...
原创 2021-08-13 01:01:45
526阅读
http://www.thinkphp.cn/topic/61661.html1. 下载thinkphp5http://www.thinkphp.cn/donate/download/id/1278.html覆盖vendor目录和extend目录2. 在项目根目录创建文件artisan (把think文件改名)#!/usr/bin/env php<?php/...
原创 2021-08-13 01:01:43
467阅读
1. 新建目录www 把index.php文件放进去修改www/index.php文件<?php// 应用入口文件//exit("内测结束");// 检测PHP环境if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');// 开启调试模式 建议开发阶段开启 部署阶...
原创 2021-08-13 01:01:41
412阅读
use think\Db;Db::startTrans();Db::commit();Db::rollback();// Thinkphp 3.2.3 多表事务$Model = M();$Model->startTrans();$userRes = $Model->table('test_user')->add(['name'=>'adm...
原创 2021-08-13 01:01:39
631阅读
在前面加 ob_clean(); /** * thinkphp3 生成验证码 */ public function verify() { ob_clean(); // header("Content-Type: image/png");// error_reporting(E_ALL);// ...
原创 2021-08-13 01:01:37
159阅读
* www/Template/User/head.html<!DOCTYPE html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scal...
原创 2021-08-13 01:01:36
285阅读
Finance::where('id', '=', 4)->update([ "payment_name" => "范科华2" ]);生成sqlUPDATE `5kcrm_oa_finance` SET `payment_name`='范科华2' WHERE `id` = 4闭包查询:$report = Repor...
原创 2021-08-13 01:01:34
248阅读
http://document.thinkphp.cn/manual_3_2.html#data_pagehttp://document.thinkphp.cn/manual_3_2.html#stat_query /** * 所有可投资产品 */ public function invest_chanpin() { $p = getValu...
原创 2021-08-13 01:01:32
201阅读
UTFWry.dat链接: https://pan.baidu.com/s/1j7tREE9qf7CRpAE1LhMUUQ 提取码: 7xei* IpLocationController.class.php<?phpnamespace index\Controller;class IpLocationController extends \Think\Controller{...
原创 2021-08-13 01:01:31
638阅读
www/Template/User/person.html <include file="snippet:drawer" menu="我的"/>这样就可以引入文件www/Template/snippet/drawer.html参数 [menu] 替换<div id="drawer" class="l-drawer v-transfer-dom" styl...
原创 2021-08-13 01:01:29
95阅读
[0]InvalidArgumentExceptioninManager.php line 103Driver [Think] not supported.{ if ($this->namespace || false !== strpos($type, '\\')) { $class = false !== strpos($type, '\\') ? $ty...
原创 2021-08-13 01:01:27
389阅读
public function toInsertSql() { /** @var $a array assoc */ $a = $this->data; $fields = array_keys($a); $b = array_map(function($e) { return "'".a...
原创 2021-08-13 01:01:26
478阅读
* ./artisan#!/usr/bin/env php<?php// 应用目录define('APP_PATH', __DIR__.'/application/');// 定义缓存目录define('RUNTIME_PATH', __DIR__.'/runtime/');// 加载框架引导文件require dirname(__FILE__).'/thinkphp...
原创 2021-08-13 01:01:24
466阅读
* install https://laravel.com/docs/5.1#installationcomposer create-project laravel/laravel msgq "5.1.*"* 配置好redis  参照这里 https://www.cnblogs.com/mingzhanghui/p/9338385.html* 修改.env 指定redis作为队列的驱...
原创 2021-08-13 00:58:25
169阅读
* 允许所有跨域 E:\apache-tomcat-7.0.81\conf\web.xml <filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>...
原创 2021-08-13 00:58:21
566阅读
https://laravel.com/docs/5.6/queues#generating-job-classes发送邮件, 短信遇到并发场合有时候会丢失, 所以希望用队列.* driver** databasephp artisan queue:table生成文件: src/backend/database/migrations/2019_01_21_072455_c...
原创 2021-08-13 00:58:20
284阅读
routes/api.php<?php// \Illuminate\Routing\Route ERRORuse \Illuminate\Support\Facades\Route;Route::group(['prefix' => 'contract', 'namespace'=>'Contract'], function() { Route::...
原创 2021-08-13 00:58:16
555阅读
使用laravel Eloquent ORM 速度太慢 返回的数据量大 public function getUnprincipal() { $now = date('Y-m-d H:i:s'); /** @var $investList array */ $investList = DB::select("SELECT money F...
原创 2021-08-13 00:58:14
1290阅读
<?php/** * Created by PhpStorm. * User: Mch * Date: 2021-06-16 * Time: 10:45 */namespace CmsV2\Services\Articles;use CmsV2\Models\Article;use Illuminate\Database\Eloquent\SoftDeletingScope;class ArticleTrashListService extends Articles...
原创 2021-08-13 00:58:13
732阅读
验证不是从get、post传参数过来的数据参考:src/Illuminate/Foundation/Validation/ValidatesRequests.php /** * Validate the given request with the given rules. * * @param \Illuminate\Http\Request $request * @param array $rules * @param a.
原创 2021-08-13 00:58:09
207阅读
<?php // Start of PDO v.1.0.4dev /** * Represents an error raised by PDO. You should not throw a * <b>PDOException</b> from your own code. * @see https://php.net/manual/en/languag
翻译 2021-08-13 00:56:40
204阅读
* 确认有 php_com_dotnet.dll D:\opt\xampp\php\ext没有就在http://pecl.php.net/下载*php.ini中开启这些配置:[COM_DOT_NET]extension=php_com_dotnet.dll[COM]com.allow_dcom=true* 使用com组件取得>2G文件大小<?php...
原创 2021-08-13 00:56:13
773阅读