首先使用artisan创建一个事件 php artisan make:event DoTest 此时在Events/目录下会生成一个DoTest文件 为这个事件创建一个监听器 php artisan make:listen DoTest 此时在Listeners/目录下会...
解决方案: 1、php.ini设置 1)、可以在代码处添加关闭超时 set_time_limit(0); ini_set(‘max_execution_time’, ‘0’); 2)、或者直接修改php.ini max_execution_time=“超时时间”值 2、...
我覆盖升级安装了go的较新的版本。 更新后,运行程序就报这个错 no required module provides package xxx: go.mod file not found in current directory or any parent directory; see 'go...
php操作文件一般是file、file_get_contents等此类函数。但是如果处理大文件,这些函数受限于性能和内存,可能就不是那么理想了! 对于PHP操作文件,我们尝试以下几种方式 一、file file 函数...
一、前言 最近和几个来应聘的中工聊了聊,基本都会问他们一些7和5的去区别 虽然7升级来已经很久了,可能大家项目中都已经在使用,但是一些面试者的回答让我不算满意 他们大概分为以下三种 1....
1.逻辑IF判断一般有: 2.有时候业务中用到:(我们都知道以下结果会输出15) 10 && $age < 25) { var_dump($age); ...
搞了PHP半生,仍然是个小兵 不能似懂非懂,回看细节等等 一、每个单词的首字母转化为大写 <?php $foo = 'hello world!'; $foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!'; $....
一、缓存穿透 缓存穿透是指缓存和数据库中都没有的数据,而用户不断发起请求,这时的用户很可能是攻击者,攻击会导致数据库压力过大。 解决方案: 接口层增加校验,如用户鉴权校验,timesta...
一安装 >=PHP7.0 >=Centos7.0 yum install beanstalkd --enablerepo=epel 启动:/usr/bin/beanstalkd -l 0.0.0.0 -p11300 -b /var/lib/beanstalkd/binlog -F & 参数: /usr/bin/beanstalkd ...
1.前端报错 Access to XMLHttpRequest at 'http://localhost:8080/api/user/login' from origin 'http://localhost:808 2.开始以为是跨域问题 已经在入口文件增加header('Access-Control-Al...
1.检查PHPinfo() 查看是否开启 simplexml 2.Linux环境安装 yum install php-xml yum install php-xmlrpc 3.重启PHP环境...
一、查询操作 $student=DB::select("select * from user"); // 返回一个二维数组 $student var_dump($student); // 以节点树的形式输出结果 dd($student); 构造器 // get()返回多条数据 $stu...
一、检查ngxin配置,以下是我的nginx配置 这里粘贴下源码供大家参考: user www www; worker_processes 4; events { worker_connections 1024; } http { include mime.types;......
一、原因是日志无写入权限。 执行 chmod -R 777 storage即可 二、在index.php文件的最上方echo "a";exit; 没问题可以输出 三、修改php.ini配置 ==display_errors== 是调试模式 从 Off 改成 ...
1.打开php.ini文件 如果不知道在哪,在程序中输入phpinfo(); 在返回中查看php.ini的位置 2.修改php.ini文件中display_errors = Off 改为 display_errors = On......
1. curl -sS https://getcomposer.org/installer | php 2. mv composer.phar /usr/local/bin/composer (全局调用) 3. composer config -g repo.packagist composer https://packagist.phpc...
没有更多内容
加载失败,请刷新页面
文章删除后无法恢复,确定删除此文章吗?
动弹删除后,数据将无法恢复
评论删除后,数据将无法恢复