作者归档:杨龙
jdk-8u251-windows-x64.exe 迅雷 emule 下载
JavaScript function* 函数
function*
这种声明方式(function
关键字后跟一个星号)会定义一个生成器函数 (generator function),它返回一个 Generator
对象。
function* generator(i) {
yield i;
yield i + 10;
}
const gen = generator(10);
console.log(gen.next().value);
// expected output: 10
console.log(gen.next().value);
// expected output: 20
console.log(gen.next().value);
// expected output: undefined
console.log(gen.next().value);
// expected output: undefined
iOS凭据(小票)验证库(PHP版)
ios-iap-php
iOS支付验证
install
composer require sn01615/apple-iap-php
use
use sn01615\iap\ios\Verify; include "../vendor/autoload.php"; $cc = new Verify(); $receipt = ".."; // 凭据 $cc->endpoint(true);// 可选切,换到沙盒环境 $cc->setPassword('123');// 可选,如果是连续订阅需要密码 $vv = $cc->query($receipt); // 打印结果 var_dump($vv);
Unexpected end of JSON input while parsing near ‘…”latest”,”merge2″:”la’
解决办法:
(1)npm install –registry=https://registry.npm.taobao.org –loglevel=silly
(2) npm cache clean –force
(3) npm install
来源:
https://blog.csdn.net/longzhoufeng/article/details/104961342
nginx: [emerg] host not found in upstream
服务器启动的时候dns解析失败,host直接绑定域名是一个解决方案,但是这样不太好
ERROR: failed to open error_log (/usr/local/var/log/php-fpm.log): Read-only file system (30)
Mar 07 17:22:59 wm php-fpm[230837]: [07-Mar-2022 17:22:59] ERROR: failed to open error_log (/usr/local/var/log/php-fpm.log): Read-only file system (30)
PHP7报错Read-only file system (30)
当你照着 此文 安装好PHP,并做好systemd服务管理文件,你会发现用systemctl start php-fpm 无法正常启动php-fpm 报了一个很奇怪的错。
ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): Read-only file system (30)
此时,selinux是关闭状态,普通用户对这个文件也可写,问题就迷离了。
解决方法:
打开 /usr/lib/systemd/system/php-fpm.service 把
ProtectSystem=true
改成
ProtectSystem=false
当这个值为true的时候,php-fpm进程将以只读的方式挂载 /usr 目录,这就是问题所在。具体可参考
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
或者修改日志文件路径也可以解决这个问题
General error: 1390 Prepared statement contains too many placeholders
经了解,Mysql默认支持的占位符最多为65535(2^16-1)个,写入数据为m列,n行。m*n必须小于65535