1、你数组那里是什么写法?
2、多次写入不要多次调用file_put_contents,因为这样多次重复了打开-写入-关闭的操作。

解决方案 »

  1.   

    最简单的方法<?file_put_contents('php.php',file_get_contents("php.php")."<\x3F \$m= array(2,3,4,4); \x3F>");
    ?>
      

  2.   


    $s = var_export ($f, true); 
    file_put_contents('test.php', " <?php\n\$f = $s;\n"); 
    $a = var_export ($cdtn, true); 
    file_put_contents('test.php', "\$cdtn = $a;\n",FILE_APPEND); 
    $b = var_export ($atmp, true); 
    file_put_contents('test.php', "\$atmp = $b;\n?>", FILE_APPEND); 
      

  3.   

    上次是问过阿, 不是一直没有人回答追加的问题么, 只好又新开一个. 估计现在这个问
    多次写入不要多次调用file_put_contents,应该用什么的也得不到回答~~