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

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -