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:
disable opcache:
ini_set('opcache.enable', '0');
i wrote @ beginning of index file can tuned particular cases
- make script run longer means of
sleep()
(pretty rough solution)
Comments
Post a Comment