02 2019 档案
摘要:主要函数有:bcadd — 将两个高精度数字相加bccomp — 比较两个高精度数字,返回-1, 0, 1bcdiv — 将两个高精度数字相除bcmod — 求高精度数字余数bcmul — 将两个高精度数字相乘bcpow — 求高精度数字乘方bcpowmod — 求高精度数字乘方求模,数论里非常常用
阅读全文
摘要:1/ 创建jobphp artisan make:job SendReminderEmail --queued2/ 设定运行时间 失败次数 3/ 数据处理 4/ 开启本地redis 设置queue.php 队列配置 5/ 监听 php artisan queue:listen --queue="队列
阅读全文
摘要:1/ 下载扩展包 composer require intervention/image 2/ 修改app.php 3/ 引入use Intervention\Image\Facades\Image; 4/ 数据处理 // 添加水印
阅读全文
摘要:function http_get_imgData($url) { $ch = curl_init (); curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, 'GET' ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, fa
阅读全文
摘要:function to_unicode($string) { $str = mb_convert_encoding($string, 'UCS-2', 'UTF-8'); $arrstr = str_split($str, 2); $unistr = ''; foreach ($arrstr as
阅读全文
摘要:use Illuminate\Validation\Rule; Rule::unique('helpness_type')->where(function($query)use($input){ return $query->where('id','!=',$input['id'])->where('deleted_at', null);})
阅读全文
摘要:class Meta做为嵌套类,主要目的是给上级类添加一些功能,或者指定一些标准. class Main(models.Model): img = models.CharField(max_length=200) # 图片 name = models.CharField(max_length=100
阅读全文
摘要:转载自:https://www.zmrenwu.com/post/3/ 万分感谢! 本教程使用的开发环境 本教程写作时开发环境的系统平台为 Windows 10 (64 位),Python 版本为 3.5.2 (64 位),Django 版本为 1.10.6。 建议尽可能地与教程的开发环境保持一致(
阅读全文
摘要:首先在确保python已经安装之后(3.7), 安装django. 刚开始学习 只做了简单的测试 就是控制器与视图,路由的链接 首先 然后将子路由文件引入到主路由文件中 也就是根目录的urls文件 接着 创建目录中的有关控制器 如 index.py 在该文件中创建demo方法 在子路由文件中正常写路
阅读全文