求解以下代码的原理

浏览:378 发布日期:2015/10/21 分类:求助交流 关键字: PHP file
以下代码中$size1和$size2始终相同,求大神解答为什么!!<?php
    $filePath = "log.txt";
    $content  = "1234567890";
    $size1    = filesize($filePath);    
    echo "size1:$size1\n";
    $fp = fopen($filePath, "wb+");
    fseek($fp, $size1);
    fwrite($fp, $content);
    fclose($fp);
    $size2 = filesize($filePath);    
    echo "size2:$size2\n";
?>
最佳答案
评论( 相关
后面还有条评论,点击查看>>