xiaoban
V2EX  ›  问与答

求问一个 PHP include 的问题 不是小白问题大家放心进入。。。

  •  
  •   xiaoban · Jun 22, 2016 · 2826 views
    This topic created in 3787 days ago, the information mentioned may be changed or developed.

    while (true) { $config = include './config.php'; var_dump($config); sleep(2); }

    代码很简单 ,就是引入文件 ,输出 在脚本跑的时候 我去改变 config.php 中的内容,正常情况下会随着文件改变而改变 但是:却没有改变,依旧是原来的值。 3 台服务器,只有一台出现了这样的情况,我初步分析应该是 PHP ( 5.6.9 )配置问题 求问,怎么解决?顺便告知原理那将感激不尽

    10 replies  •  2016-06-22 17:04:56 +08:00
    odirus
    odirus
    Jun 22, 2016❤️1
    1
    这台服务器是不是开启了 OPcache 这种缓存?
    odirus
    odirus
    Jun 22, 2016
    2
    或者类似的东西?
    sensui7
    sensui7
    Jun 22, 2016
    4
    这种调试方法好牛啊,
    weer0026
    weer0026
    Jun 22, 2016
    5
    题外话:题主头像真高清啊~
    doublleft
    doublleft
    Jun 22, 2016
    6
    @weer0026
    传说中的“哇,看不到像素点”
    xiaoban
    xiaoban
    OP
    Jun 22, 2016
    7
    @odirus 是 Opcache 的问题,已解决
    xiaoban
    xiaoban
    OP
    Jun 22, 2016
    8
    @raincious 是 Opcache 的问题,已解决
    odirus
    odirus
    Jun 22, 2016
    9
    楼主,推荐一个脚本给你,可以根据需要自行修改(记得开启认证)

    https://gist.github.com/kabel/d12c35bde74814e45c14

    ( web 操作,免得老是登录服务器)
    popu111
    popu111
    Jun 22, 2016
    10
    不是小白问题不敢进入 QwQ
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1498 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 22:37 · PVG 06:37 · LAX 14:37 · JFK 17:37
    ♥ Do have faith in what you're doing.