- 博客(21)
- 资源 (1)
- 收藏
- 关注
原创 yii2关于json的操作
yii\helpers\Json继承于BaseJsonyii\helpers\BaseJsonhtmlEncode 静态方法将给定的值编码为 JSON 字符串进行 HTML-escaping 转义实体,这样就可以安全地嵌入 HTML 代码中。该方法通过支持 JavaScript 表达式来增强 json_encode()。HTML-escaping解释:对html来说,<, > , ?, & 和引号等有特殊意义,例如连接,如果你确实需要在网页显示html标签,
2022-01-18 11:42:49
1169
原创 yii2使用系统自带DB log migration脚本问题
执行 ./yii migrate --migrationPath=@yii/log/migrations/创建成功出现以下界面:创建数据库create table {{%log}} ... done (time: 0.021s)创建索引create index idx_log_level on {{%log}} (level) ... done (time: 0.025s)create index idx_log_category on {{%log}} (category) ..
2021-12-21 11:25:01
454
原创 node-sass各种安装失败终极解决方式
安装node-sass可能出现的失败的情况有下: 第一:各种网络问题。设置淘宝源即可 npm config set registry http://registry.npm.taobao.org/ 第二:提示node-sass版本过高!切记先npm install node-sass,这种操作会安装最新版本的node-sass。打开package.age,查看node-sass版本号,在npm uninstall node-sass...
2021-10-24 19:50:07
2091
1
原创 vue 报vue-style-loader、css-loader错误
yarn 编译出现以下错误:缺少相关库* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-6ba1f787","scoped":false,"hasInlineConfig":false}!sass-loader?{"sourceMap":true}!../../node_modules/vue-
2020-11-02 11:27:13
1946
原创 关于 composer options配件选项合集
--dev:将软件包添加到require-dev。 --dry-run:模拟命令,而无需实际执行任何操作。 --prefer-source:从source可用时安装软件包。 --prefer-dist:从dist可用时安装软件包。 --no-progress:删除进度显示,该显示可能会与某些不处理退格字符的终端或脚本混淆。 --no-update:禁用自动更新依赖项(意味着--no-install)。 --no-install:更新composer.lock文件后不运行安装步骤。 --no-s
2020-10-29 21:26:54
881
原创 linux下mysql端口查看设计相关命令合集
一、查看3306端口是否被占用netstat -anp |grep3306二、进入mysql查看端口mysql -uroot -pshow global variables like 'port';三、查看mysqld服务ps -el | grep mysqld直接执行 以下iptables命令即可其他:查看iptables 命令如下 which iptables whereis iptables ubun...
2020-10-29 21:23:07
362
原创 关于mac docker lamp 部署中关于 yii2 composer 及--no-update相关解释
(1)进入root账户进入容器:~ docker exec -it -u root 【容器】 /bin/bash(2)执行 composer global require "fxp/composer-asset-plugin"composer --vvv global require "fxp/composer-asset-plugin"会出现 wariing 警告:Do not run Composer as root/super user! See https://getcomp..
2020-10-29 21:01:19
376
原创 macos操作隐藏文件
//操作隐藏文件defaults write com.apple.finder AppleShowAllFiles -bool true;KillAll Finderdefaults write com.apple.finder AppleShowAllFiles -bool false
2020-10-29 20:36:42
95
原创 关于mac下xampp 设置软连接
必须加sudo权限才可以,不然虽然可以创建文件但会失败。sudo ln -s 源文件 目标文件比如 XAMPP下的htdocs链接 MAMP/htdocs 这样这样MAMP就可以访问XAMPP下的资源了。sudo ln -s /Applications/XAMPP/xamppfiles/htdocs /Applications/MAMP/htdocs...
2020-10-29 20:34:50
180
原创 macbook关于avast杀毒 系统启动项目手工优化
open 打开修改/Library/LaunchDaemons:系统启动时运行,用户不登录也会运行。 /Library/LaunchAgents:用户自定义的用户启动项avast 防止自动启动com.avast.init.plistcom.avast.uninstall.plistcom.avast.update.plist配置说明:/Library/LaunchDaemons:系统启动时运行,用户不登录也会运行。/Library/LaunchAgents:用户登录后运行。
2020-10-29 20:31:59
322
原创 mac xammp
871123511.首先下载php的mongodb扩展从http://pecl.php.net/package/mongodb$ tar -zxvfmongodb-1.5.3.tgz2 .进入解压目录,运行phpize$ cd mongodb-1.4.3$ /Applications/XAMPP/bin/phpize4.安装编译mongodb的php扩展第3步...
2020-10-29 20:18:25
79
原创 macOS Catalina 环境下docker node yarn vue 安装部署教程
mac docker 安装略~一、部署node第一步:docker pull node 这里默认最新版本镜像说明:https://hub.docker.com/_/node2020年10月19日 默认安装的是最新的 15.0.1-alpine3.10node 版本为:v15.0.1 环境已经集成了 yarn 不需要在单独安装部署后查看 cat /etc/issue 系统: Debian映射mac下的地址:我的为 ~/Documents/softlib/nodejs 作参考.
2020-10-29 20:16:57
945
原创 Exception Yii2 错误处理常用汇总方法
200: OK。一切正常。 201: 响应POST请求时成功创建一个资源。Locationheader 包含的URL指向新创建的资源。 204: 该请求被成功处理,响应不包含正文内容 (类似DELETE请求)。 304: 资源没有被修改。可以使用缓存的版本。 400: 错误的请求。可能通过用户方面的多种原因引起的,例如在请求体内有无效的JSON 数据,无效的操作参数,等等。 401: 验证失败。 403: 已经经过身份验证的用户不允许访问指定的 API 末端。 404: 所请求的资源...
2020-09-22 12:34:39
1174
原创 mysqld --initialize –usrer=mysql datadir=/var/lib/mysql 无法初始化错误
root@XXXX:/etc/mysql# mysqld --initialize --user=mysql --datadir=/var/lib/mysql2020-01-21T07:50:04.937397Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defa...
2020-01-21 16:02:02
4311
1
原创 macos 10.14 无法找到/usr/include解决办法
首先XCODE 10 在CommandLineTools工具进行了升级导致ur/incloude文件没有了 因为apple要以后拒绝使用unix风格.....。这会需要通过open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg重新安装一遍 CommandLineToo...
2018-11-03 15:44:12
2850
原创 macos mojave xammp7.0 配置Xdebug
配置php 环境变量第一步 :open ~/.bash_profile第二步:添加一下内容export XAMPP_HOME=/Applications/XAMPPexport PATH=${XAMPP_HOME}/bin:${PATH}export PATHexport PATH="$PATH:/Applications/XAMPP/xamppfiles/bin"第三...
2018-11-02 16:33:19
320
原创 如何在yii2 小部件里加载js文件
list($path, $webPath) = Yii::$app->getAssetManager()->publish(__DIR__."/assets);$this->getView()->registerJsFile($webPath);
2018-11-01 16:51:27
718
原创 Yii2 - 如何使用registerJs
为了在Yii2框架中使用javascript,必须使用yii\web \view对象注册脚本。Yii2为它提供了两种方法 registerJs()用于内联脚本 registerJsFile()用于外部脚本文件。内联脚本的registerJs()以下是注册内联脚本的示例。 $ script =“function test(){console.log('a meesag...
2018-11-01 16:32:26
2967
原创 yii2 FilterWhere 和 where() 区别
$query->where([ 'status' => 10, 'type' => null, 'id' => [4, 8, 15], ]);相当于sql 中的 ...WHERE (`status` = 10) AND (`type` IS NULL) AND (`id` IN (4, 8, 15)) 。$query->filterWhere(['sta...
2018-10-31 16:41:58
1136
原创 yii2 find()->select([])
yii2 find()->select(['a','b','c']) == select a,b,c from XXXX
2018-10-31 16:21:24
4453
macos Sierra至Mojave 下zendstudio 剪切崩溃修复布丁
2018-10-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人