V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
xiaoban
V2EX  ›  问与答

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

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

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

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