Devphp opcache 指定目录 不缓存 返回首页
搜索

php opcache 指定目录 不缓存

发表于2018-10-07|更新于2026-11-16|php

https://blog.csdn.net/hoooooly/article/details/82593558
配置文件

1
opcache.blacklist_filename=/usr/local/php/etc/opcache-blacklist.txt

opcache-blacklist.txt的内容为

1
/home/wwwroot/website/test.appname.com/*
文章作者: developer
文章链接: https://blog.iguojin.com/2018/10/07/php%20opcache%20%E6%8C%87%E5%AE%9A%E7%9B%AE%E5%BD%95%20%E4%B8%8D%E7%BC%93%E5%AD%98/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
PHPopcache指定目录不缓存
上一篇
supervisor 管理 workerman gatewayworker 进程
报错原因我们直接用supervisor启动gatewayworker 会发现都报错,无法启动这是因为 supervisor 无法管理后台程序,只能管理前台https://wenda.workerman.net/question/2671 解决办法修改start.php在Worker::runAll();之前增加代码 1Worker::$daemonize = false;
下一篇
mysql for update lock 悲观锁 解决并发问题
mysql常用的锁有for update 和 for update in share mode两种 锁的区别 for update 我认为是悲观锁,其他事务读会被阻塞等待,写被禁止,且不准多次加锁 for update in share mode 读取不等待,写入会被禁止,可被多次加锁 in share mode的问题如果两个事务对同一行数据加锁很容易导致,两个事务都更新失败 使用场景基于以上特点介绍,in share mode可以用于两个表关联时,保护主表数据不被修改,for update更适合保护单表单行数据的正确性,适合投票、提现等场景 测试验证以下代码验证for update的作用表maxcount中marks初始为8,每次减1,当他大于0时,将当时数据保存,类似于抽奖中控制最大奖品数的问题tp中lock(true)会默认使用for update锁,我们每次测试修改代码即可 并发配置使用ab发400并发 1ab -n 400 -c 400 http://127.0.0.1/ 测试代码1234567891011121314151617$marks = -1;Db::tra...
相关推荐
2019-03-03
thinkphp beego swoft yaf 性能测试 压力测试 php go swoole 速度对比 数据读取
1ab -n 10000 -c 200 统一使用ab在200并发进行10000次请求 为更接近实际使用,用各自模型读取了一条数据 测试机为腾讯云1核1G普通云硬盘,如果用ssd的话php成绩会有所提升 用nginx做转发,会限制golang性能发挥,压测nginx静态页面大概2157qps 首先需要说明,swoft和beego在裸跑时,效率爆棚,几乎逼近处理静态文件,速度是thinkphp的6-7倍.增加nginx后有了较大耗损,差不多是thinkphp的1.7倍.受制于nginx和fpm,yaf这种框架也只是比thinkphp提升了一丢丢,实际意义已经不大 thinkphp+nginx253大部分请求都比较慢,但是基本上是0.8S左右 12345678910111213141516171819202122232425262728Concurrency Level: 200Time taken for tests: 39.601 secondsComplete requests: 10000Failed requests: 0Tota...
2019-09-06
PHP 非典型 算法题
有一母牛,到4岁可生育,每年一头,所生均是一样的母牛,到15岁绝育,不再能生,20岁死亡,问n年后有多少头牛。 12345678910111213141516171819202122232425/** * 计算某年的牛数量 * @param int $year 第几年 * @param int $birthYear 生育年 * @param int $oldYear 停止生育年 * @param int $deadYear 死亡年 * @return int 总数 */function cow_num(int $year, int $birthYear = 4, int $oldYear = 15, int $deadYear = 20): int{ // 初始数量1头牛1 static $num = 1; for ($i = 1; $i <= $year; $i++) { if ($i >= $birthYear and $i <= $oldYear) ...
2020-09-30
docker php 安装 pqsql
12345678910FROM php:7.2.2-fpm# 国内源RUN apt-get cleanRUN apt-get update RUN apt-get install -y libpq-devRUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsqlRUN docker-php-ext-install pdoRUN docker-php-ext-install pdo_pgsql
2019-08-30
php SplQueue php标准库 队列 和数组 性能差异
数组模拟队列12345678910111213141516171819$t1 = microtime(true);$arrq = array();for ($i = 0; $i < 100000; $i++) { $data = "hello $i\n"; array_push($arrq, $data); if ($i % 100 == 99 and count($arrq) > 100) { $popN = rand(10, 99); for ($j = 0; $j < $popN; $j++) { array_shift($arrq); } }}$popN = count($arrq);for ($j = 0; $j < $popN; $j++) { array_shift($arrq);}$t2 = microtime(true);echo ($t2 -...
2017-09-02
php apache 配置 https ssl phpstudy 开启 Forward Secrecy 前向保密
SSL HTTPS检测获得A+的方法 检测地址 https://www.ssllabs.com/ssltest/ apache版本 2.4 开启php的openssl模块 开启apache的ssl模块 一般大家是用apache虚拟机的增加如下配置 1234567891011121314151617181920212223242526272829Listen 443<VirtualHost *:443> DocumentRoot "C:\php\www" ServerName iguojin.com ServerAlias # 开启HSTS长期有效 Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" # 开启SSL SSLEngine on # 添加SSL协议支持协议 SSLProtocol all -SSLv2 -SSLv3 # 服务器...
2015-09-10
mysql_fetch_object
mysql_fetch_object() 函数从结果集(记录集)中取一行作为对象。使用 -> 取出数据
avatar
developer
AI相伴的开发者博客
文章
1035
标签
742
分类
36
公告
This is my Blog
最新文章
wslc空间清理2026-11-16
Cmder 跟随 Windows 明暗主题2026-10-28
Intel(R) System Usage Report禁用2026-10-18
压力测试2026-10-16
税务学习记录2026-10-13
© 2025 - 2026 By developer框架 Hexo 8.1.2|主题 Butterfly 5.7.0
搜索
数据加载中