- 博客(41)
- 收藏
- 关注
原创 unlink() Resource temporarily unavailable
【代码】unlink() Resource temporarily unavailable。
2023-09-28 15:14:13 132
转载 PHP 读取PDF文件内容之PdfParser
PdfParser,一个独立的PHP库,提供了多种工具来从PDF文件提取数据,不支持加密的PDF文件。官方文档:https://www.pdfparser.org/documentation。3.获取文件的基本信息,如:制作人、日期、总页数等。
2023-09-28 14:51:40 794 3
原创 前端在请求头添加自定义参数报跨域错误
需要在项目中查找到 Access-Control-Allow-Headers 进行设置。报错原因是服务器端对未设置的自定义请求头进行了拦截。
2023-08-23 18:27:27 587 2
转载 caught TypeError: Cannot read properties of undefined (reading ‘install‘) at Vue.use
【代码】caught TypeError: Cannot read properties of undefined (reading ‘install‘) at Vue.use。
2023-07-31 16:23:44 174 1
转载 PHP获取本机真实IP
$preg = "/\A((([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\.){3}(([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\Z/";//获取操作系统为win2000/xp、win7的本机IP真实地址 exec("ipconfig", $out, $stats); if (!empty($out)) { foreach ($out AS $row) {
2021-07-28 17:32:11 1079
原创 Mysql左关联查询,对应关联字段模糊关联
$sql = "SELECT count(*) as counts FROM A a left join B i on instr(i.name,a.title) > 0 or instr(a.title,i.name) > 0 where i.name = '张三'";$company = Db::query($sql);instr(name,title)在name中查询title第一次出现的位置
2021-07-12 14:28:47 568
转载 php使用PHPAnalysis提取关键字中文分词
php使用PHPAnalysis提取关键字中文分词1.下载WordAnalysis链接: https://pan.baidu.com/s/1zJ3hn1G6eluE9AoBrr7fmw 提取码: zg8m2.下载后放到extend目录下<?php/** * @auther: xxf * Date: 2019/8/19 * Time: 11:04 */namespace WordAnalysis;/** * 中文分词提取关键字 */class Analysis{
2021-02-05 14:28:12 231
转载 workerman 报错stream_socket_server(): unable to connect to tcp://0.0.0.0:8282 (Address already in use)
workerman 报错stream_socket_server(): unable to connect to tcp://0.0.0.0:8282 (Address already in use)端口号被占用:更换端口号
2021-01-27 16:04:39 3367
原创 (index):315 WebSocket connection to ‘ws://x.x.x.x:8282/‘ failed: Error in connection establish
(index):315 WebSocket connection to ‘ws://x.x.x.x:8282/’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT服务器未放行端口:去服务器安全组添加放行端口
2021-01-27 15:40:17 1067 4
原创 Can‘t connect to local MySQL server through socket ‘/usr/local/mysql/mysql.sock‘
Can’t connect to local MySQL server through socket ‘/usr/local/mysql/mysql.sock’linux 进入mysql文件执行 mysql -uroot -p 输入密码进入mysql报以上错误原因:缺少mysql.sock文件1.进入mysql/bin目录,执行:./mysqld_safe --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
2021-01-27 15:32:12 1158 1
原创 The server quit without updating PID file (/usr/local/mysql[FAILED]123123.pid)
/usr/local/mysql/support-files/mysql.server start启动MySQL服务器时报以下错误Starting MySQL.2021-01-19T09:53:22.948007Z mysqld_safe error: log-error set to ‘/usr/local/mysql/data/mariadb/mariadb.log’, however file don’t exists. Create writable for user ‘mysql’.The
2021-01-19 18:48:19 272 1
原创 1130 - Host ‘***‘ is not allowed to connect to this MySQL server
1130 - Host ‘***’ is not allowed to connect to this MySQL server的解决办法报错原因:此时的MySQL配置不支持远程连接解决办法:修改配置1.linux进入数据库mysql -u root -p 密码2.查看配置select host, user from user;3.修改配置update user set host = '%' where user ='root';4.执行以下命令使之生效flush privil
2021-01-19 18:35:00 63
原创 异步图片上传
异步图片上传HTML<input type="hidden" id="img_url"><input id='img_file' type="file" class="mui-input-clear mui-input">JQuery$("#login").click(function () { var username = $("#account").val(); var file = document.getElementById('img_file')
2020-12-28 14:44:34 81
转载 TP查询字段值为空,不为空
thinkphp查询字段值为空和不为空清空$where['name'] = ['exp', 'is null']; //为空的$where['name'] = ['exp', 'is not null']; //不为空的
2020-12-26 10:23:52 2863
转载 excel上传 is not recognised as an OLE file
excel上传 is not recognised as an OLE file上传时还要区分 xls、xlsx、csvif (!file_exists($fileName)) { die('no file!');}$extension = strtolower( pathinfo($fileName, PATHINFO_EXTENSION) );if ($extension =='xlsx') { $objReader = new \PHPExcel_Reader_Excel2
2020-12-23 18:30:20 1999
原创 [Err]1267 - Illegal mix of collations(utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for o
[Err]1267 - Illegal mix of collations(utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=mysql数据库联表时发生以上错误:所联表的字符集不同,不能联表查询
2020-12-17 10:42:06 616
原创 gatewayworker 报错 Cannot assign requested address
gatewayworker启动时:Warning: stream_socket_server(): unable to connect to tcp://101...**:2900 (Cannot assign requested address) in /www/bbs/vendor/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2233这是ip填写错误本机ip、服务地址ip都是服务器主私网IP...
2020-12-09 17:45:55 383
转载 Linux 安装php7
1.安装依赖包yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2
2020-11-28 16:03:46 484 1
原创 Swoole从入门到精通
Swoole的安装1.下载Swoolephp版本7.0以上 Centoswget https://pecl.php.net/get/swoole-4.2.0.tgz2.安装依赖yum -y install gcc gcc-c++ autoconf pcre-devel make3.编译php i ze./configuremake install4.配置编译成功后修改php.ini,加入extension=swoole.so(注意这里是swoole.so扩展地址)5.测试在
2020-11-18 22:25:24 272
原创 Linux初学者小知识
1.打开终端进入root命令:sudo -s 进入根目录:cd…/…/2.环境在 /usr/local下面3.hosts在 /etc下面3.启动php:usr/local/php/sbin/php-fpm重启php:sudo service php-fpm restart关闭php:pkill php-fpm查看是php否启动未启动已启动4.启动nginx:/usr/local/nginx/sbin/nginx关闭ngnux:/usr/local/nginx/sbin/ngi
2020-10-30 17:14:34 259
原创 window下安装配置Redis
window安装Redis1.下载并解压Redishttps://github.com/MicrosoftArchive/redis/releases2.php开启Redis扩展下载Redis拓展地址:https://pecl.php.net/package/redis根据自己的php版本下载3.将php_redis.dll和php_redis.pdb两个文件放在php环境下的ext文件夹将下面两行放到php.ini中extension=php_igbinary.dllextens
2020-09-27 15:30:15 95
原创 PHP手机号一键登录
APP手机号一键登录(极光)1.极光注册账号创建应用,设置认证2.认证时RSA 加密公钥是 -----BEGIN RSA PRIVATE KEY----- 、-----END RSA PRIVATE KEY-----包含的字符串配置完成后移动端调用极光接口获取token值,用token值请求服务器端php服务public function getMobile() { $param = $this->param; $data['loginToken
2020-09-03 18:07:44 1379
原创 GetWayworker环境配置
GetWaywork启动报 “php 不是内部或外部命令,也不是可运行的程序 或批处理”1 下载GetWaywork:(https://www.workerman.net/download)3 进入GetWayworker文件,打开start_for_win.bat,有时会出现:php 不是内部或外部命令,也不是可运行的程序 或批处理。 这是因为window系统变量没有设置: 系统环境变量在 右键我的电脑(计算机)->属性->高级系统属性 ->高级->环境变量 在用户变量中
2020-08-21 11:19:02 745
原创 闭包查询
TP5闭包查询where1和where是 OR的关系;传参用 use $es = Db::name('communication') ->where(function($query)use($where1){ $query->where($where1); }) ->whereOr(function($query)use($where2){
2020-07-31 10:23:12 363
原创 验证联系电话
//手机var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; if(phone.length !=11){ fail("请输入有效的手机号码"); return false; }else if(!myreg.tes...
2019-04-12 13:09:32 751
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人