后端
weixin_37581116
这个作者很懒,什么都没留下…
展开
-
python 打开手机,并滑动,抖音自动刷视频
from Devices import Devicesfrom multiprocessing import Processfrom phoneTools import phoneToolsimport time'''author--Jenson'''if __name__ == '__main__': DevicesObj = Devices() devices = DevicesObj.execShell('adb devices') deviceReadL.原创 2021-01-26 14:52:28 · 666 阅读 · 0 评论 -
当您 composer 安装或者更新时报错提示 killed 时,这是因为当前服务器内存不足,增加内存即可。
free -m// total used free shared buff/cache available// Mem: 1838 427 858 46 552 1217// Swap: 1023 304 719mkdir -p /var/_swap_cd /var/_swap...原创 2020-07-30 10:18:49 · 308 阅读 · 0 评论 -
Yii2 rbac 权限
<?phpnamespace common\Services;use Yii;class RbacService extends Services { private $Auth; protected $CreatePost; protected $Admin; protected $Author; protected $authIte...原创 2020-04-24 10:20:18 · 125 阅读 · 0 评论 -
Yii relations 的基本使用
<?phppublic function getGoodsCat() { return $this->hasOne(GoodsCat::class, ['cat_id' => 'goods_cat_id']);}原创 2020-04-22 18:53:58 · 135 阅读 · 0 评论 -
自改Yii2 gii脚手架
<?php/** * This is the template for generating the model class of a specified table. *//* @var $this yii\web\View *//* @var $generator yii\gii\generators\model\Generator *//* @var $tableNam...原创 2020-04-22 18:42:17 · 102 阅读 · 0 评论 -
php 之mongo的使用
<?php'mongodb' => [ 'class' => '\yii\mongodb\Connection', 'dsn' => 'mongodb://myAdmin:666666@127.0.0.1:27017/admin', //myAdmin是用户名,666666是密码 27017是端口号 admin是数据库名],/*...原创 2020-04-22 18:33:53 · 107 阅读 · 0 评论 -
自写框架之入口文件
<?phpuse controllers\Base;/* * Here is the import profile * **/$config = (object)array_merge( require_once "./config/db.php", require_once "./config/config.php");(new Base())-&...原创 2020-04-22 18:24:06 · 95 阅读 · 0 评论 -
Yii2 event 事件的用法
public function onPaySuccess($event) { echo $event->data['msg']; return $event->handled;}public function test() { $this->on(self::ON_PAY_SUCCESS, [$this, 'onPaySuccess'], ['ms...原创 2020-04-22 18:18:53 · 356 阅读 · 0 评论 -
微信公众号配置服务器TOKEN
/* * 验证token * **/public function actionIndex() { $WechatSer = new WechatService(); $WechatSer->setParams('signature', $this->params["signature"]); $WechatSer->setParams('time...原创 2020-04-22 18:01:32 · 234 阅读 · 0 评论 -
Yii2 发送邮件简单使用
static public function getEmail() { if (empty(self::$_Email)) { self::$_Email = Yii::$app->mailer->compose(); } return self::$_Email;}/* * 发送邮件 * **/static public f...原创 2020-04-22 17:57:16 · 148 阅读 · 0 评论 -
PHP 的注释
/*** @name 名字* @abstract 申明变量/类/方法* @access 指明这个变量、类、函数/方法的存取权限* @author 函数作者的名字和邮箱地址* @category 组织packages* @copyright 指明版权信息* @const 指明常量* @deprecate 指明不推荐或者是废弃的信息* @example 示例* @exclude 指明当前的注释将不进行...转载 2018-04-09 11:06:43 · 205 阅读 · 0 评论 -
sql 语句中计算时间
SELECT * FROM t_device_task tdt LEFT JOIN t_device_inspecttask tdi ON tdt.inspecttask_id = tdi.inspecttask_id LEFT JOIN t_device_report tdr ON tdi.report_id = tdr.report_id WHERE tdt.tas...原创 2018-07-11 17:04:58 · 1298 阅读 · 1 评论 -
配置yii2 log日志
'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' ...原创 2018-07-03 11:30:26 · 1575 阅读 · 0 评论 -
Js 上传遇到Access control allow origin 问题
后端php文件加上 header("Access-Control-Allow-Origin: *");原创 2018-04-27 15:44:41 · 621 阅读 · 0 评论