|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-10-19 07:40 UTC] sander@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
$fh = fopen('myfile.txt', 'w+'); $content = fread( $h, filesize('myfile.txt')); echo $content; fseek( $fh, 0 ); fwrite( $fh, $newcontent ); ftruncate( $fh, strlen( $newcontent ) ); No matters de contents of myfile.txt, no output is generated. If I replace the first line to $fh = fopen('myfile.txt', 'r+'); everythings works fine if the file exists. Manu.