原 查问我看笔记功能的实现过程
代码要用的-增加查问我看笔记功能
删除数据表ip_record里的所有行
DELETE FROM ip_record WHERE id!=0
DELETE FROM w_note WHERE id!=0
phpstrripos() 函数用于查找字符串在另一字符串中最后一次出现的位置
PHP字符串转数字...
查问我看笔记如何达到自己想要的效果
查问我看笔记如何达到自己想要的效果,想呀想
效果越来越好了,哈哈 20200405
发现标签添加时用select2的控件输入超过3个字就显示不到,体验不好,看看能不能调试 2020045 1136...
这里测试下多用户写笔记的效果
这里测试下多用户写笔记的效果 20200405 1133...
用超级用户运行composer require提示不要用超级用户运行composer
在Centos7系统上,用root登陆,执行下面代码
composer require --prefer-dist hightman/xunsearch "*@beta"...
ActiveForm升阶-增加placeholder-自己在项目里搜到的代码
$form = ActiveForm::begin($options); echo $form->field($model, 'summary', [ 'inputOptions' => [ 'class' => 'form-control',//在整个项目里搜inputOptions找到的,试了下果然是这个来控制样式的 'placeholder' => '这里输入内容的摘要便于后续查找内容,可以把转载的内容在这里整理下', ], ] )->textarea(['rows'=>2]); ActiveForm::end();
这里听到了歌曲 M2M - pretty Boy ,我2000年左右第一次听到后就很喜欢的,当时在网吧一直听呀听,当时的感觉很好,回到了那时吗?...
写着代码,听到了M2M - pretty Boy
接上面的
去百度:M2M - pretty Boy,靠前的结果是
http://www.kuwo.cn/play_detail/2240613
结果听不了,点播放无效,看了下页面有错误
百度:M2M - pretty Boy 酷狗音乐,可以听,ok
https://www.kugou.com/song-36/ez3qb7,dxbq90,mbu1y31,cifs69,2hxw52c.html...
提交表单提示:内容只能包含至多2,000个字符。于是改为5000
提交表单提示:内容只能包含至多2,000个字符。不改不行了,还是我当时考虑到了,于是content字段用的TEXT格式。...
Yii2组件扩展Select2的优化问题
输入标签时,输入四个中文以上,就会遇到输入内容被遮挡的问题。 2020406 04:30...
服务器上composer安装了Yii2的扩展yii-xunsearch支持中文全文索引搜索
https://www.yiiframework.com/extension/yii-xunsearch...
关于代码遗漏更改的问题-以后要一起改
属性字段的表单提交,在更新操作上都搞好了,忘记在新增操作上加上了对应的代码,花了10分钟查出了原因,在public function actionCreate($fid=0){ ...
查问我看20200406整站代码已经上传到百度云
项目整个的文件包括数据库,都备份了wokan_20200406_mysql_0246_php_0355.zip...
今天搞全文索引全文搜索
今天搞全文索引全文搜索 20200406 11:18...
composer 使用composer install –no-scripts 报错了
[root@izj6c76p38xsj1pdgufa46z wokan]# composer install -–no-scripts
Do not run Composer as root/super user! See https://getcomposer.org/root for details...
网上查了下说composer install 的Symfony\Component\Console\Exception\RuntimeException报错要composer update
composer update又不行,尴尬 2020406 16:01
于是有去运行composer update
[root@izj6c76p38xsj1pdgufa46z wokan]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information...
YII2 composer update 报错解决一例
composr update 报错后,网上查的这个试试。
composer global require "fxp/composer-asset-plugin"
[root@izj6c76p38xsj1pdgufa46z ~]# composer global require "fxp/composer-asset-plugin"
Changed current directory to /root/.config/composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details...
composer global require "fxp/composer-asset-plugin"后composer update遇到的问题
composer global require "fxp/composer-asset-plugin"后composer update遇到的问题,要去获取Token令牌,于是访问https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+izj6c76p38xsj1pdgufa46z+2020-04-06+0810 这个地址,如果没注册登陆github的话,注册登陆下。然后复制Token,在命令粘贴下回车,ok
提示:- kartik-v/yii2-mpdf dev-master requires mpdf/mpdf ~8.0
[root@izj6c76p38xsj1pdgufa46z wokan]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Could not fetch https://api.github.com/repos/components/codemirror, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo......
composer update又出了问题,由于项目文件3年没用过composer安装扩展了,各种问题
- egulias/email-validator 2.1.x-dev requires doctrine/lexer ^1.0.1 -> no matching package found.
- yiisoft/yii2-swiftmailer 2.1.x-dev requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[v6.
2.3].
- swiftmailer/swiftmailer v6.2.3 requires egulias/email-validator ~2.0 -> satisfiable by egulias/email-validator[2.1.x-d
ev].
- Installation request for yiisoft/yii2-swiftmailer ~2.0.0 || ~2.1.0 -> satisfiable by yiisoft/yii2-swiftmailer[2.1.x-de
v].
[root@izj6c76p38xsj1pdgufa46z wokan]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- egulias/email-validator 2.1.x-dev requires doctrine/lexer ^1.0.1 -> no matching package found.
- yiisoft/yii2-swiftmailer 2.1.x-dev requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[v6.
2.3]. ...
查看composer的版本
看了下版本,好像也不低,不过还是重新安装下
[root@izj6c76p38xsj1pdgufa46z ~]# composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details...
composer 安装扩展时遇到的问题
composer 安装扩展时遇到的问题,不是一般的多,别说新安装的扩展,之前在composer.json里的扩展也是各种问题,有些扩展停止维护弃用了,有些扩展更新了,依赖关系又变了。
接上面composer update ,一样失败
现在提示是"yiisoft/yii2-swiftmailer": "2.1.x-dev",的问题于是去查了yii2-swiftmaileryii2的扩展
https://www.yiiframework.com/extension/yiisoft/yii2-swiftmailer
官网写的是run
php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer...
mpdf/mpdf扩展又出问题
- Can only install one of: mpdf/mpdf[v8.0.0-RC1, 7.0.x-dev].
- Can only install one of: mpdf/mpdf[v8.0.0-RC1, 7.0.x-dev].
[root@izj6c76p38xsj1pdgufa46z wokan]# php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
Could not open input file: composer.phar
[root@izj6c76p38xsj1pdgufa46z wokan]# curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...
Composer (version 1.10.1) successfully installed to: /var/www/html/wokan/composer.phar
Use it: php composer.phar
[root@izj6c76p38xsj1pdgufa46z wokan]# php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
Do not run Composer as root/super user! See https://getcomposer.org/root for details...
之前项目代码里有隐性的问题-composer去掉一些扩展引出的问题
这个就是当时弄的时候,自己重新写了一个Pdf类,还在公共配置文件里引用了,结果删了 \kartik\mpdf\Pdf,出问题了,所有config文件夹里的文件不建议用use引用项目内的类。就不应该这样用
D:\AppServ\www\wokan\common\config\main.php:
2
3 use kartik\mpdf\Pdf;
4: use frontend\components\VsPdf;
5 //图片上传大小的限制 imageFileMaxSize...
删了yii2-swiftmailer后在重新用php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
yii2-swiftmailer,删除了扩展后
php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
装上了,强烈建议用这种方案安装扩展
[root@izj6c76p38xsj1pdgufa46z ~]# cd /var/www/html/wokan
[root@izj6c76p38xsj1pdgufa46z wokan]# php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^2.1@dev for yiisoft/yii2-swiftmailer
./composer.json has been updated
Loading composer repositories with package information...
深度浪漫-网站设计-url没有完成简洁
http://www.deepromance.com/site/login而不是http://www.deepromance.com/login
网址/site/login 而不是网址/login...