|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-30 11:16 UTC] pajoye@php.net
-Status: Open
+Status: Feedback
[2010-03-30 11:16 UTC] pajoye@php.net
[2010-03-30 13:34 UTC] johannes@php.net
[2010-03-30 13:42 UTC] imaggens at gmail dot com
[2010-03-30 13:57 UTC] pajoye@php.net
[2010-03-30 13:59 UTC] pajoye@php.net
[2010-03-30 15:07 UTC] imaggens at gmail dot com
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ PHP Version: 5.3.1 installed from Zend Server CE (This option is not present in dropdown menu) === Begin of Short Script === $file = file_get_contents( 'path/to/my/file' ); // ... if( ! file_put_contents( 'file/to/be/created', $file ) ) { // LOG } === End of Short Script === I've made all necessary routines to grab the content file correctly. If I change the content of file and refresh the page, I can see the changes (with print, echo or var_dump) But, no matter how many times I change the content and I refresh the page, the content of the created file doesn't changes. The only way to overwrite the file is restarting my PC. And the content is only overwritten at the first try. After some tries, I got the same "static" content. And more. Even if I remove the file, manually or by script, the File's Creation Date still the same as the date of the first call of file_put_contents() (currently, 28.03.2010). If I change the name of file to be created, the updated content is created succesfully. Another content change and page refresh, and the created file still with the same content. Test script: --------------- The base script is the Short Script posted above, the difference is, in my files, it is separate in factory and adapter classes. Expected result: ---------------- Well, the existent file with updated content, as in the source file. Actual result: -------------- At the first try, after turn on the computer, the content is updated. All the tries after the first one, he content doesn't changes.