随笔分类 -  PHP

摘要:下面两种情况都可以考虑下是否是mcrypt这个库未安装 提示:Call to undefined function mcrypt_module_open() 安装mcrypt扩展库 人人商城登录失败也可以看下是否是自己未安装mcrypt扩展库,默认是用mcrypt库进行AES的加解密 第一步、安装 阅读全文
posted @ 2021-08-23 15:34 GetcharZp 阅读(275) 评论(0) 推荐(0) 编辑
摘要:网上很多说法是第三方服务的问题,不过我们这边之前那个服务器上都是正常的,那么,考虑到这里最大可能就是配置的问题了,参考 https://wiki.w7.cc/chapter/35?id=3903 得到了思路 修改 php.ini 文件中的 always_populate_raw_post_data 阅读全文
posted @ 2021-08-09 17:15 GetcharZp 阅读(147) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env php 作用通过 #!/usr/bin/env php 用来指定文件以php脚本的形式运行新建文件的时候就可以省去文件后缀.php。 阅读全文
posted @ 2020-12-29 23:39 GetcharZp 阅读(263) 评论(0) 推荐(0) 编辑
摘要:CodeIgniter 运行报错 Fatal error: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in /var/www/CodeIgniter4/system/CodeIgniter. 阅读全文
posted @ 2020-12-29 22:36 GetcharZp 阅读(270) 评论(0) 推荐(0) 编辑
摘要:PHP通过phpspreadsheet读取Excel文件 安装 通过 Composer 安装 composer require phpoffice/phpspreadsheet 读文件 三行代码解决Excel文件的读取操作: use PhpOffice\PhpSpreadsheet\Reader\X 阅读全文
posted @ 2020-11-19 21:04 GetcharZp 阅读(2032) 评论(1) 推荐(0) 编辑
摘要:PHP通过QrReader类对二维码进行解码得到相应的字符串 安装 通过 Composer 安装 qrcode-detector-decoder composer require khanamiryan/qrcode-detector-decoder 代码案例 use Zxing\QrReader; 阅读全文
posted @ 2020-11-19 00:34 GetcharZp 阅读(850) 评论(0) 推荐(0) 编辑
摘要:PHPQrcode快速实现二维码的生成 简介 PHPQrcode(点击下载) 是一个PHP 的文件,里面封装了二维码图片的生成,支持的图片格式有 png ,通过参数的配置可以设置二维码的大小、边距、码的颜色、定位点的颜色.使用的话也比较简单,只需要将PHPQrcode.php 这个文件引入到待使用的 阅读全文
posted @ 2020-11-18 20:31 GetcharZp 阅读(562) 评论(0) 推荐(0) 编辑
摘要:通过微擎生成二维码 // 加载生成二维码需要用到的库 load()->library('qrcode'); // 生成二维码并保存 QRcode::png(url, 文件名, $level=QR_ECLEVEL_L, $size=3, $margin=4,$saveandprint=false);/ 阅读全文
posted @ 2020-09-23 16:26 GetcharZp 阅读(803) 评论(0) 推荐(0) 编辑
摘要:第一步、使用composer引入laravel中的ui库 composer require laravel/ui --dev 第二步、生成bootstrap的基本脚手架 php artisan ui bootstrap 第三步、安装package.json中的库 npm install 第四步、运行 阅读全文
posted @ 2020-08-23 15:36 GetcharZp 阅读(291) 评论(0) 推荐(0) 编辑
摘要:LeetCode 部分题解 PHP 版 53. 最大子序和 function maxSubArray($nums) { $ans = $nums[0]; $sum = 0; foreach ($nums as $num) { if ($sum > 0) { $sum += $num; } else 阅读全文
posted @ 2020-07-21 21:44 GetcharZp 阅读(337) 评论(0) 推荐(0) 编辑
摘要:问题描述: 在安装thinkPHP的时候,使用命令 composer create-project topthink/think=5.1.* tp5 提示上面的错误;错误提示:zsh: no matches found: 5.1.* 暂时的解决办法: 指定确定的版本号,不要使用 * 这种 compo 阅读全文
posted @ 2020-06-08 21:14 GetcharZp 阅读(608) 评论(0) 推荐(0) 编辑
摘要:支付成功后,再如下路径的order.php的payResult() 方法中可以进行支付成功后自定义的一些操作。 阅读全文
posted @ 2020-06-08 21:10 GetcharZp 阅读(572) 评论(0) 推荐(0) 编辑
摘要:查看订单表ewei_shop_order的status字段,为0表示未支付; 支付状态: status{ -1取消状态(交易关闭),0普通状态(没付款: 待付款 ; 付了款: 待发货),1 买家已付款(待发货),2 卖家已发货(待收货),3 成功(可评价: 等待评价 ; 不可评价 : 交易完成)4 阅读全文
posted @ 2020-06-08 21:07 GetcharZp 阅读(520) 评论(0) 推荐(0) 编辑
摘要:问题描述: 在使用商户号的支付接口的时候提示 发放失败,错误码为-2 原因为:帐号余额不足,请到商户平台充值后再重试,然而商户号里面分明有钱。 问题原因: 开通了【运营账户】,进行发红包等操作时,默认使用【运营账户】中的钱。 解决办法: 将【基本账户】中的余额适量转入到【运营账户】中。 阅读全文
posted @ 2020-05-19 09:13 GetcharZp 阅读(1178) 评论(0) 推荐(0) 编辑
摘要:案例: $country = new Country; $country->code = "AB"; $country->name = "name"; $country->population = 123; var_dump($country->save()); var_dump($country- 阅读全文
posted @ 2020-03-10 20:21 GetcharZp 阅读(585) 评论(0) 推荐(0) 编辑
摘要:通过 innseJoin 可以将当前 model 对应的数据表和 参数带的表进行关联,(注意表名要用全称) 第一步: innerJoin('待关联的表名', '两个表中的对应相关字段') 第二步: 就可以通过 andFilterWhere() 指定相关的条件 $query->innerJoin('d 阅读全文
posted @ 2020-03-06 19:37 GetcharZp 阅读(342) 评论(0) 推荐(0) 编辑
摘要:通过 Yii::$app->user->identity->表的字段名 可以获取登录用户的登录信息 阅读全文
posted @ 2020-03-06 15:42 GetcharZp 阅读(314) 评论(0) 推荐(0) 编辑
摘要:通过加上 'format' => 'html' 可以是 GridView 中的列具备html标签; 例子: [ 'attribute' => 'remark', 'value' => function ($model) { return Html::a('超链接', 'https://getchar 阅读全文
posted @ 2020-03-06 13:43 GetcharZp 阅读(215) 评论(0) 推荐(0) 编辑
摘要:YII 报错: Response content must not be an array yii 在 Controller 中返回数据,要加返回数据前加下面代码: Yii::$app->response->format = Response::FORMAT_JSON; 返回的数据为 return 阅读全文
posted @ 2020-03-06 11:52 GetcharZp 阅读(355) 评论(0) 推荐(0) 编辑
摘要:第一步:通过 gii 生成 CRUD 的代码 第二步:修改该视图所对应的 model 中的 attributeLabels 函数 public function attributeLabels() { return [ 'id' => 'ID', 'order_id' => '订单 ID', // 阅读全文
posted @ 2020-03-05 11:09 GetcharZp 阅读(151) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示