PHP file is not refreshed after fwrite and fclose -


i doing following:

$configurationfile = fopen($configurationfilepath, 'w'); $result = fwrite($configurationfile, $newfilecontent); fflush($configurationfile); fclose($configurationfile); if ($result) {     echo '<pre>'; var_dump(require('file.php')); die(); ... 

and old data shown, though in editor or after page refresh can see new content.

how force php see new file content right after fclose?

thanks @engvrdr hint. problem opcache extension , ended 2 ways:

  1. disable opcache:

    ini_set('opcache.enable', '0');

i wrote @ beginning of index file can tuned particular cases

  1. make script run longer means of sleep() (pretty rough solution)

Comments

Popular posts from this blog

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -